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

Re: [PATCH] fast-import: Increase the default pack depth to 50

From
Jeff King <peff@peff.net>
Date
Jun 8, 2017, 07:05 UTC
Message-ID
<20170608070537.zgrcxhl57u4akzvq@sigill.intra.peff.net>
In-Reply-To
<20170608053436.9121-1-mh@glandium.org>
On Thu, Jun 08, 2017 at 02:34:36PM +0900, Mike Hommey wrote:
Show 11 quoted lines
> In 618e613a70, 10 years ago, the default for pack depth used for
> git-pack-objects and git-repack was changed from 10 to 50, while
> leaving fast-import's default to 10.
> 
> There doesn't seem to be a reason besides oversight for the change not
> having happened in fast-import as well.
> 
> Interestingly, fast-import uses pack.depth when it's set, and the
> git-config manual says the default for pack.depth is 50. While the
> git-fast-import manual does say the default depth is 10, the
> inconsistency is also confusing.

Makes sense. If anything, fast-import would want to allow a deeper depth than normal, since (IIRC) its delta chains are always completely linear. Whereas in a real pack, if we decide not to make a delta off the 50th item in a chain, we usually find the 48th or 49th, and end up with a bushier graph.

It probably doesn't matter that much, though, as you'd really want to `repack -f` afterwards if you care about getting good deltas. And one base object every 50 versions is probably fine for keeping the initial pack manageable.

> ---
>  Documentation/git-fast-import.txt | 2 +-
>  fast-import.c                     | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
Patch itself looks obviously correct.
-Peff
Previous: Mike HommeyNext: Mike Hommey
Message 2 of 4 in “fast-import: Increase the default pack depth to 50”
  1. fast-import: Increase the default pack depth to 50Mike Hommey, Jun 8, 2017
  2. Jeff KingJun 8, 2017
  3. Mike HommeyJun 8, 2017
  4. Jeff KingJun 8, 2017

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.