[Feature request] Shallow clone
Hi,
This is not a bug but a feature request.
I'm working from China and network is not always stable ... so that, with a repository getting bigger and bigger with history, sometimes, the deployment gets stuck because the network gets broken (that is the beauty of this location ... it happens sometimes, not on a regular basis ...). In our case, the repository only contains 2 small jars, but past history makes the git repository too big, over a size limit that broke the connection (in my case : 8,4Mo)
Having a way to clone only the latest commit and not the whole history would make this easier to deploy. For that I was thinking about shallow clone (clone --depth=1) that might do the trick.
Hi. Romain.
I've considered shallow clones since the beginning for the same reason and, let me know if I'm wrong but as far as I remember, it's not possible to push to the heads using a shallow clone since it creates a new set of commits with different SHA1s.
Maybe a simpler solution could be using well-known root directory (one not temporary) for git clones.
On Oct 19, 2016 05:32, "Romain Gonord" [email protected] wrote:
Hi,
This is not a bug but a feature request.
I'm working from China and network is not always stable ... so that, with a repository getting bigger and bigger with history, sometimes, the deployment gets stuck because the network gets broken (that is the beauty of this location ... it happens sometimes, not on a regular basis ...). In our case, the repository only contains 2 small jars, but past history makes the git repository too big, over a size limit that broke the connection (in my case : 8,4Mo)
Having a way to clone only the latest commit and not the whole history would make this easier to deploy. For that I was thinking about shallow clone (clone --depth=1) that might do the trick.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/synergian/wagon-git/issues/43, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWESdq6Z9Sst52ILGDrHyoA2rYWEuYpks5q1dWugaJpZM4Kasn7 .
I think the limitation on git shallow clone was on old git version. Now (from Git 1.9) it should work well. At least, this is what is said on bitbucket documentation : https://confluence.atlassian.com/bitbucketserverkb/unable-to-push-new-commit-from-shallow-clone-847357274.html
it's worth a try, I guess. The change is quite simple. Can you provide a pull request?
If it works, I'd say we need a environment flag to be able to disable it (in case someone still uses an old git version) and that it should be the default behavior.
On Oct 19, 2016 08:13, "Romain Gonord" [email protected] wrote:
I think the limitation on git shallow clone was on old git version. Now it should work well. At least, this is what is said on bitbucket documentation : https://confluence.atlassian.com/bitbucketserverkb/unable- to-push-new-commit-from-shallow-clone-847357274.html
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/synergian/wagon-git/issues/43#issuecomment-254783291, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWESVFlwMk3lKuzCfMYIcmobd-lYKDKks5q1ftIgaJpZM4Kasn7 .
Ok, don't expect anything in the next 10 days, I'll give it a try after my holiday =P