Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Shallow clone using JGit

Support for shallow clones is coming along bit by bit I think - JGit can now serve shallow clones (ie when used in server mode) and apparently RevWalk now supports traversing shallow clones:

However, I don't think the JGit library currently supports doing a shallow clone as a client - if you look at the JGit CloneCommand, there's no sign of it:

I used to miss this feature too, but I've come to be less convinced of it's use - what do you feel it's useful for? For a reasonably 'sane' repo (one that has slowly grown over time) the brilliant packfile storage format means that saving on transmitted data (between shallow and non-shallow) is often less than 10% - so is the shallow clone worth the hassle?

For a repo that is relatively sane now (but had a psychotic episode a few years back when someone checked in a big file) the savings will be better - the shallow clone will mean you probably don't have to download that massive blob - but if the repo is under your control, it's probably just better to clean the repo history up using git-filter-branch or similar, so that everyone gets the benefit of a saner history.

best regards,

On 11 January 2013 08:41, Justin Saliba <salijust@xxxxxxxxxxx> wrote:

I was wondering whether it would be possible to execute a shallow clone using your library? A stackoverflow question ( from a few months back suggests that you can't but I was hoping that the functionality would be implemented by now.


Back to the top