Re: [PATCH 1/2] Check order when reading index
- From
Jeff King <peff@peff.net>
- Date
- Aug 25, 2014, 19:44 UTC
- Message-ID
- <20140825194430.GI30953@peff.net>
- In-Reply-To
- <xmqqvbpgmqmh.fsf@gitster.dls.corp.google.com>
On Mon, Aug 25, 2014 at 10:21:58AM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> > + 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.For my own curiosity, how do you get into this situation, and what does it mean to have multiple stage#1 entries for the same path? What would "git cat-file :1:path" output?
-Peff