Re: [RFC]: Pack-file object format for individual objects (Was: Revisiting large binary files issue.)
- From
- sf <sf-gmane@stephan-feder.de>
- Date
- Jul 11, 2006, 21:45 UTC
- Message-ID
- <44B41BFD.8010808@stephan-feder.de>
- In-Reply-To
- <Pine.LNX.4.64.0607111053270.5623@g5.osdl.org>
Linus Torvalds wrote: ...
> On Tue, 11 Jul 2006, sf wrote:
...
Show 5 quoted lines
>> Step 1. When reading individual objects from disk check the first nibble >> and decode accordingly (see above). > > Check more than that, but yes, this should be tightened up in my > series.
Just look at the first byte of the object file _without doing any decompression_. It is 0x78 _if and only if_ the object file is in the traditional format.
Show 14 quoted lines
>> Step 3. Remove code for (old) individual object disk format. > > Well, I'm not sure how necessary that even is. We actually do have to > generate the old header regardless, if for no other reason than the fact > that we generate the SHA1 names based on it (even if we then write a > new-style dense binary header to disk and discard the ASCII header). > > Having it there means that you can always just get a new version of git, > and never worry about how old the archive you're working with is. > > (And then doing a "git repack -a -d" will make any archive also work with > an old-style git, since the pack-file format didn't change, and a "git > repack" thus ends up always creating something that is readable by > anybody, including old clients).
Agreed.
Regards Stephan