Re: git repack command on larger pack file
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 28, 2015, 06:23 UTC
- Message-ID
- <xmqqlhanmrz7.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20151027234406.GB4172@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> Git tries to take some shortcuts when repacking: if two objects are in > the same pack but not deltas, it will not consider making deltas out of > them. The logic is we would already have tried that while making the > original pack. But of course when you are doing weird things with the > packing parameters, that is not always a good assumption.
Yup, that is http://thread.gmane.org/gmane.comp.version-control.git/16223/focus=16267
Show 5 quoted lines
> [1] This is all theory, and I don't know how well git actually finds > such deltas, but it is probably better to have a dense tree of > deltas rather than long chains. If you have a chain of N objects > and would to add object N+1 to it, you are probably not much worse > off to base it on object N-1, creating a "fork" at N.
Yes, your guess is perfectly correct here, and indeed we did an extensive work along that line in 2006/2007. For an example, see http://thread.gmane.org/gmane.comp.version-control.git/51949/focus=52003
The histogram "verify-pack -v" produces was in fact done primarily in order to make it easy to check the distribution of delta depth.
Thanks.