Re: pack v4 status
- From
Junio C Hamano <junkio@cox.net>
- Date
- Feb 27, 2007, 22:36 UTC
- Message-ID
- <7vwt23b54a.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <alpine.LRH.0.82.0702271717080.29426@xanadu.home>
Nicolas Pitre <nico@cam.org> writes:
Show 19 quoted lines
> On Tue, 27 Feb 2007, Linus Torvalds wrote: > >> On Tue, 27 Feb 2007, Shawn O. Pearce wrote: >> > ... >> > All trees are then converted to use a 22 byte record format: >> > >> > - 2 byte network byte order index into the string pool >> > - 20 byte SHA-1 >> >> Umm. Am I missing something, or is this totally braindamaged? >> >> Are you really expecting there to never be more than 64k basenames? Trust >> me, that's a totally broken assumption. Anything that tracks generated >> stuff will _easily_ have several tens of thousands of random filenames >> even in a single tree, much less over the whole history of the repository. > > The idea is to deal with only tree objects containing the 64K most > frequently used base names and fall back to the current tree object > encoding for objects that couldn't be represented that way.
Ah, I was wondering the same thing as Linus after seeing shawn talked about the 2-byte prefix on #git. Falling back to an alternate encoding for rarer cases makes sense.