On Mon, Aug 25, 2014 at 7:21 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Jaime Soriano Pastor <jsorianopastor@xxxxxxxxx> writes: > >> Subject: Re: [PATCH 1/2] Check order when reading index > > Please be careful when crafting the commit title. This single line > will be the only one that readers will have to identify the change > among hundreds of entries in "git shortlog" output when trying to > see what kind of change went into the project during the given > period. Something like: > > read_index_from(): catch out of order entries while reading an index file > > perhaps? > Ok, reprashing it. >> +void check_ce_order(struct cache_entry *ce, struct cache_entry *next_ce) > > Does this have to be global, i.e. not "static void ..."? > Not really, changing it to static. >> + if (ce_stage(ce) >= ce_stage(next_ce)) >> + die("Unordered stage entries for '%s'", >> + ce->name); > > Not quite. We do allow multiple higher stage entries; having two or > more stage #1 entries is perfectly fine during a merge resolution, > and both ce and next_ce may be pointing at the stage #1 entries of > the same path. Replacing the comparison with ">" is sufficient, I > think. > Ok, but like Jeff, I'm also curious about how to have multiple stage #1 entries for the same path. Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html