Implementing a lighter clone #7067
Unanswered
lorenzobergama6
asked this question in
Ideas
Replies: 1 comment
-
Yes, you can do this via remote_cb on git_clone_options: Create the remote in that callback using git_remote_create_with_fetchspec |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
If I am not mistaken, now
git_clone
can only fetch each and every branch from the remote, in line with standardgit clone
. Please correct me if I am wrong!It could be useful to implement a lighter clone: to be consistent with standard Git, I think one could implement the
--single-branch
option which fetches only the branch to checkout to. It could probably be a new field in thegit_clone_options
struct. Another way would be to expose fetch'srefspecs
argument in thegit_clone_options
struct.Beta Was this translation helpful? Give feedback.
All reactions