Re: [PATCH v7 3/7] eoie: add End of Index Entry (EOIE) extension

2018-10-02 Thread Ben Peart
On 10/1/2018 11:30 AM, Duy Nguyen wrote: On Mon, Oct 1, 2018 at 3:46 PM Ben Peart wrote: @@ -2479,6 +2491,7 @@ static int do_write_index(struct index_state *istate, struct tempfile *tempfile, if (ce_write(&c, newfd, &hdr, sizeof(hdr)) < 0) return -1; + offse

Re: [PATCH v7 3/7] eoie: add End of Index Entry (EOIE) extension

2018-10-02 Thread Ben Peart
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 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

Re: [PATCH v7 3/7] eoie: add End of Index Entry (EOIE) extension

2018-10-01 Thread Duy Nguyen
On Mon, Oct 1, 2018 at 3:46 PM Ben Peart wrote: > @@ -2479,6 +2491,7 @@ static int do_write_index(struct index_state *istate, > struct tempfile *tempfile, > if (ce_write(&c, newfd, &hdr, sizeof(hdr)) < 0) > return -1; > > + offset = lseek(newfd, 0, SEEK_CUR) + write_

Re: [PATCH v7 3/7] eoie: add End of Index Entry (EOIE) extension

2018-10-01 Thread SZEDER Gábor
On Mon, Oct 01, 2018 at 09:45:52AM -0400, Ben Peart wrote: > From: Ben Peart > > 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 hav

[PATCH v7 3/7] eoie: add End of Index Entry (EOIE) extension

2018-10-01 Thread Ben Peart
From: Ben Peart 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 ab