Re: [PATCH v7 3/7] eoie: add End of Index Entry (EOIE) extension
- From
Ben Peart <peartben@gmail.com>
- Date
- Oct 2, 2018, 14:34 UTC
- Message-ID
- <dd8622f1-9005-a989-6934-2b9cd24c87a9@gmail.com>
- In-Reply-To
- <20181001151716.GL23446@localhost>
On 10/1/2018 11:17 AM, SZEDER Gábor wrote:
Show 35 quoted lines
> On Mon, Oct 01, 2018 at 09:45:52AM -0400, Ben Peart wrote:
>> From: Ben Peart <benpeart@microsoft.com>
>>
>> The End of Index Entry (EOIE) is used to locate the end of the variable
>> length index entries and the beginning of the extensions. Code can take
>> advantage of this to quickly locate the index extensions without having
>> to parse through all of the index entries.
>>
>> Because it must be able to be loaded before the variable length cache
>> entries and other index extensions, this extension must be written last.
>> The signature for this extension is { 'E', 'O', 'I', 'E' }.
>>
>> The extension consists of:
>>
>> - 32-bit offset to the end of the index entries
>>
>> - 160-bit SHA-1 over the extension types and their sizes (but not
>> their contents). E.g. if we have "TREE" extension that is N-bytes
>> long, "REUC" extension that is M-bytes long, followed by "EOIE",
>> then the hash would be:
>>
>> SHA-1("TREE" + <binary representation of N> +
>> "REUC" + <binary representation of M>)
>>
>> Signed-off-by: Ben Peart <peartben@gmail.com>
>
> I think the commit message should explicitly mention that this this
> extension
>
> - will always be written and why,
> - but is optional, so other Git implementations not supporting it will
> have no troubles reading the index,
> - and that it is written even to the shared index and why, and that
> because of this the index checksums in t1700 had to be updated.
> Sure, I'll add that additional information to the commit message on the next spin.