Re: [RFC]: Pack-file object format for individual objects (Was: Revisiting large binary files issue.)
From: sf <hidden>
Date: 2016-06-15 22:42:33
Linus Torvalds wrote: ...
On Tue, 11 Jul 2006, sf wrote:
...
quoted
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.
quoted
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