git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Jeff KingNext: Junio C Hamano
Message 6 of 9 in “git repack command on larger pack file”
  1. Sivakumar SelvamOct 26, 2015
  2. Junio C HamanoOct 26, 2015
  3. Junio C HamanoOct 26, 2015
  4. Sivakumar SelvamOct 27, 2015
  5. Jeff KingOct 27, 2015
  6. Junio C HamanoOct 28, 2015
  7. Junio C HamanoOct 28, 2015
  8. Philip OakleyOct 27, 2015
  9. Jeff KingOct 27, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.