Skip to content

Conversation

@hoangtrann
Copy link

sometimes, there can be a need to only keep certain directories after aggregate, e.g using hatch-odoo for instance and we want to install all modules included in web

this changed add a sparse-checkout attribute to keep what's specified.

./web:
    remotes:
        oca: https://github.com/OCA/web.git
    target: oca 18.0
    merges:
        - oca 18.0
    sparse-checkout:
        - web_responsive

@hoangtrann
Copy link
Author

@sbidoul would you mind having a look?

Copy link

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi thanks for your contribution.

  • could you update the README, introducing sparse_checkout feature. Thanks !

@hoangtrann hoangtrann force-pushed the feat-git-sparse-checkout branch from 20c345e to b9a81aa Compare October 21, 2025 08:32
@hoangtrann hoangtrann force-pushed the feat-git-sparse-checkout branch from b9a81aa to def9307 Compare October 21, 2025 08:34
@hoangtrann
Copy link
Author

thanks @legalsylvain , I've updated the README.rst file

@hoangtrann
Copy link
Author

@sbidoul might I have your review on this one?

Copy link

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. I think this feature interesting.

However, I think we should have an option to enable or ignore it during the gitaggregate command.
For me, this feature is interesting in production, but prevent you to contribute in dev environment. Or did I missed something ? how do you work with that ?

thanks !

@hoangtrann
Copy link
Author

Thanks @legalsylvain , I'm not sure about contributing in development per your comment. Could you elaborate?

@legalsylvain
Copy link

maybe my question is not relevant. Let see what other reviewer says.

@stephenwade
Copy link

@legalsylvain This feature is useful if you use git-aggregator to collect repos during a Docker image build. It probably should not be used if you use git-aggregator for contributing locally.

@legalsylvain
Copy link

@legalsylvain This feature is useful if you use git-aggregator to collect repos during a Docker image build. It probably should not be used if you use git-aggregator for contributing locally.

OK. So, it should be great to have a --no-sparse-checkout / --sparse-checkout option on git aggregate. otherwise, it will be not be possible to contribute with the repos.yml that contains sparse-checkout.

@hoangtrann
Copy link
Author

@legalsylvain you means an attribute in the repo.yaml file per "directory" or "repo"? Right now sparse-checkout will only be used with a flag and not the default behavior

@legalsylvain
Copy link

No I mean a --no-sparse-checkout option in the gitaggregate, to ignore the sparsecheckout configuration present in the repos.yml.

sorry if I'm not clear.

What I undestand is :
the new configure

    sparse-checkout:
        - web_responsive

allow to checkout, when deploying your odoo in production, only oca/web/web_responsive module. Right ?
We have the following benefit :

  • less space used by odoo in disk
  • no possibility for user to install undesired modules.

But

if we use this repos.yml file in developpement, when we gitaggregate, we want to have the possibility to clone all the repos, and not only sparse checkouted modules. Otherwise, it is not possible to contribute.

Did I missed something ?

@hoangtrann
Copy link
Author

You are right, I let me add that flag

@hoangtrann
Copy link
Author

@legalsylvain I've added --no-sparse-checkout as discussed

Copy link

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks !

code review / no test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants