-
Notifications
You must be signed in to change notification settings - Fork 277
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
Ability to pass options to clone? #295
Comments
@benbalter Currently, the underlying libgit2 code doesn't support making shallow clones nor does it support recursive submodule updates. Using the submodule APIs, it would probably be possible to implement the equivalent of |
Le sad. Thanks for the prompt response. |
Shallow fetches/clones are a mess and still a hack. There is currently an attempt at making them better-defined, but the odd repos that result are a mess and still have many limitations even with git-core. While not as fast to type, you do have a programming language available, which makes automatic recursive submodule initialisation less of an advantage. It's probably enough of a promiment git-core feature that it will have to be implemented at some point. |
Thanks for clarifying @carlosmn - you're right (as always). I do have it on my TODO list to add recursive submodule support to libgit2 checkout and clone, but it hasn't been too high up there. Still, probably a good thing to get to and not too hard, I think. |
Better shallow-repo support is on my list, but the concepts are tangled up with alternates and grafts, and it could get a little hairy. |
FWIW, related libgit2 issue is libgit2/libgit2#3058 |
libgit2 added shallow support in version 1.7.0 (July 2023) |
Thanks for updating this ancient issue. Marking as resolved. |
hmm, but I don't see how Rugged allows me to pass a value for depth to fetch? |
#980 should address this |
I think this issue should still be open as #980 has not been merged. The following snippet is way slower than running Rugged::Repository.clone_at(source, dir, credentials:, depth: 1) Option is not being handled by rugged/ext/rugged/rugged_repo.c Lines 536 to 608 in 010e611
and rugged/ext/rugged/rugged_repo.c Lines 514 to 534 in 010e611
|
Wondering if it's possible to pass options to the clone action, specifically
--recursive
and--depth=1
Here's what I've got:
The text was updated successfully, but these errors were encountered: