Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for getting specified versions of submodules #165

Open
davidski opened this issue Jan 10, 2022 · 0 comments
Open

Support for getting specified versions of submodules #165

davidski opened this issue Jan 10, 2022 · 0 comments

Comments

@davidski
Copy link

Thanks for the great library. I've been migrated to gert from git2r, hoping to get support for cloning repositories with submodules (reference git2r's issue on recursive).

If I call a git_clone() on a repository that has a submodule (tracking a specific commit in the submnodule), then follow that with a get_submodule_fetch() I end up with the submodule being at the HEAD state of the remote repository, rather than the commit string specified in the parent module. I currently work around this by doing the git_clone(), then the git_submodule_fetch() then shelling out to call git submodule update --recursive --init.

Is there a way to carry out this process entirely within gert? There's an enticing bit of code (not exported) here suggesting it's been considered. Even better would be to get full git clone --recursive support on the initial git_clone() call. That last function doesn't pass through any extra arguments at the moment.

Appreciate the time!

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

No branches or pull requests

1 participant