From: Duy Nguyen Date: Thu, 21 Aug 2014 13:59:45 GMT Subject: Re: [PATCH] Check order when reading index Message-ID: In-Reply-To: <1408628606-12975-1-git-send-email-jsorianopastor@gmail.com> On Thu, Aug 21, 2014 at 8:43 PM, Jaime Soriano Pastor wrote: > @@ -1499,6 +1514,9 @@ int read_index_from(struct index_state *istate, const char *path) > ce = create_from_disk(disk_ce, &consumed, previous_name); > set_index_entry(istate, i, ce); > > + if (i > 0) > + check_next_ce(istate->cache[i-1], ce); > + > src_offset += consumed; > } > strbuf_release(&previous_name_buf); It may be nice to save the "good index" stamp as an index extension so we don't have to check this over and over. I'm thinking about big indexes where compare cost might matter (I'm not so sure yet, will do some testing when I have time). -- Duy