On 10/1/2018 11:17 AM, SZEDER Gábor wrote:
On Mon, Oct 01, 2018 at 09:45:52AM -0400, Ben Peart wrote:
From: Ben Peart <benpe...@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 <peart...@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.

Reply via email to