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

Re: [PATCH 4/8] git-repack --max-pack-size: add fixup_header_footer()

From
Nicolas Pitre <nico@cam.org>
Date
Apr 9, 2007, 19:33 UTC
Message-ID
<alpine.LFD.0.98.0704091525260.28181@xanadu.home>
In-Reply-To
<56b7f5510704091211i3d101cafq371fbb96ca27238b@mail.gmail.com>
On Mon, 9 Apr 2007, Dana How wrote:
Show 6 quoted lines
> Wouldn't the following address the "object count unknown
> at the start of sequential pack writing" problem:
>  Write 0 for object count in the header. This is a flag to look for
>  another header of same format just before the final SHA-1 which
>  has the correct count. The SHA-1 is still a checksum of everything
>  before it and no seeking/rewriting is needed on generation.

No. You really wants to know up front how many objects a pack contains when streaming it. And this is not only for packs written to stdout.

Show 5 quoted lines
> Finally, when I generate several 2GB split packfiles,  I do notice
> the slight delay for fixup_header_footer(), and I do think it's a bit
> ugly, but in quantitative terms it's an insignificant part of a long
> operation that's infrequently performed.  Does this need to be
> optimized at all?

Maybe, maybe not. That depends how much data we think GIT could be used to manage in the future. With a 1TB pack file you definitely want to optimize that case.

OTOH this could wait for the real pack v4 too.
Nicolas
Previous: Dana HowNext: Dana How
Message 8 of 10 in “git-repack --max-pack-size: add fixup_header_footer()”
  1. 4/8 git-repack --max-pack-size: add fixup_header_footer()Dana How, Apr 8, 2007
  2. Junio C HamanoApr 9, 2007
  3. Nicolas PitreApr 9, 2007
  4. Shawn O. PearceApr 9, 2007
  5. Nicolas PitreApr 9, 2007
  6. Shawn O. PearceApr 9, 2007
  7. Dana HowApr 9, 2007
  8. Nicolas PitreApr 9, 2007
  9. Dana HowApr 9, 2007
  10. Nicolas PitreApr 9, 2007

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.