Shallow clone support
Hi there
I was hoping for support for git clone --depth 1 so that we can support init'ing repos without all the history data.
I'd be happy to have a go but am totally new to the project (as in, 5 mins new)
Absolutely, have a go! You might want to see how core git does this, it's probably something in the request sent to the remote. Then take a look at src/fetch.c, the changes will probably start there. Good luck, and don't be afraid to ask questions; we hang out in #libgit2 on irc.freenode.net.
i'm taking a look at this now. Seeing i've never written in c, i'm a bit out of the loop on how to use interop or even what I am meant to be looking for.
what i've done to date:
- i've started to add a unit test for
CanCloneShallow - i've added an optional parameter to
Repository.cs - started digging around the clone support in libgit2 (dont think there is any depth at all.
- felt a bit lost as I am not a c programmer at_all
some updates on how JGit have been looking at it over the years:
- http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg00512.html
nudge nudge
I'm looking at libgit for a project I have on the drawing board, but it would need this feature. I do know C, but I don't know either the libgit codebase or the git codebase. Does anyone here have an intuition as to how much work adding this feature would be?
I do know C, but I don't know either the libgit codebase or the git codebase.
Hey, that's great! We would be very pleased to help you work on this.
Does anyone here have an intuition as to how much work adding this feature would be?
/cc @carlosmn @ethomson Thoughts?
I think discussing it over in a libgit2 issue would be great. We've been thinking about working on this as well, it would be great to pair up.
-ed
On Nov 13, 2014, at 2:46 PM, nulltoken [email protected] wrote:
I do know C, but I don't know either the libgit codebase or the git codebase.
Hey, that's great! We would be very pleased to help you work on this.
Does anyone here have an intuition as to how much work adding this feature would be?
/cc @carlosmn @ethomson Thoughts?
— Reply to this email directly or view it on GitHub.
I'm also interested in working on shallow copies. For reference, here's a closed discussion on libgit2 and unfortunately not too many search results for 'shallow clone'
Appears the recent discussion is here : https://github.com/libgit2/libgit2/issues/3058
This issue is now nearly 8 years old. The corresponding issue at https://github.com/libgit2/libgit2/issues/3058 is 5 years old.
Will this get implemented soon? Is there any new information? (libgit2 has a open PR, but there is currently no progress / was forgotten?; however when it is implemented in libgit2, it must still get implemented here to make it finally working, but I have no idea how long that would take)
In my use-case I just want to use git fetch --prune --unshallow but with the API 😄
Any progress on this issue?
Is this on the horizon?
any progress here guys? this ticket is 11 years old
With this merged https://github.com/libgit2/libgit2/pull/6396, then it should be feasable to add to libgit2sharp
Legendary 🥇
wait 11 years
🤷♂️ bump and +1 here.
@bording with https://github.com/libgit2/libgit2/pull/6396 merged - please can we make this a high priority? It will provide significant performance benefits for a range of use-cases
https://github.com/libgit2/libgit2/releases/tag/v1.7.0
libgit2 has made a new release including the shallow clone feature
@dougrathbone It's been a few years but as you now have 11 experience with this repository, would you reimplement your initial changes with shallow cloning now available in libgit2?
Is this supported now or not? Not clear from here. Any code sample? Any documentation? Please let us know, thanks.
libgit2sharp does not support shallow cloning yet. Anyone is invited to implement it in a pull request although I do not know how much time the maintainers take for this repository lately, it seems there was very little activity the last few months.
+1
@bording is it correct to assume that this ticket is solved with https://github.com/libgit2/libgit2sharp/pull/2066/commits/cd6936506ca7808c2fab7454fe5df95c99188d2d ??
@hoerup No, that just adjusts the format of the internal struct so that the interop continues to work. For now, I've just hardcoded it to always be a full fetch, same as it's always been.
There would need to be more work done to enable shallow clones.
Shallow cloning would be amazing..,