Re: [PATCH] Check order when reading index

2014-08-21 Thread Junio C Hamano
Jaime Soriano Pastor writes: > Signed-off-by: Jaime Soriano Pastor > --- > read-cache.c | 18 ++ > 1 file changed, 18 insertions(+) > > diff --git a/read-cache.c b/read-cache.c > index 7f5645e..e117d3a 100644 > --- a/read-cache.c > +++ b/read-cache.c > @@ -1438,6 +1438,21 @@ sta

Re: [PATCH] Check order when reading index

2014-08-21 Thread Duy Nguyen
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); > > +

Re: [PATCH] Check order when reading index

2014-08-21 Thread Jaime Soriano Pastor
On Thu, Aug 21, 2014 at 3:43 PM, Jaime Soriano Pastor wrote: > + if (!ce_stage(ce)) > + die("Multiple stage entries for merged file '%s'", > + ce->name); This case can be provoked by "git update-index --index-info" as shown in the

[PATCH] Check order when reading index

2014-08-21 Thread Jaime Soriano Pastor
Signed-off-by: Jaime Soriano Pastor --- read-cache.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/read-cache.c b/read-cache.c index 7f5645e..e117d3a 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1438,6 +1438,21 @@ static struct cache_entry *create_from_disk(struct o