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