Merge branch 'jp/index-with-corrupt-stages'
commit04631848c4bd66bf802983482b7b99021da85c9f
authorJunio C Hamano <gitster@pobox.com>
Fri, 19 Sep 2014 18:38:34 +0000 (19 11:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Sep 2014 18:38:34 +0000 (19 11:38 -0700)
tree6780c16454a9453ec1dbe87e27f6779a523f8918
parentbd656f6e7bea734896be25d281e983ab9e1f5384
parent0344d93ced82a5e492d0e2a555047346445d2495
Merge branch 'jp/index-with-corrupt-stages'

A broken reimplementation of Git could write an invalid index that
records both stage #0 and higher stage entries for the same path.
Notice and reject such an index, as there is no sensible fallback
(we do not know if the broken tool wanted to resolve and forgot to
remove higher stage entries, or if it wanted to unresolve and
forgot to remove the stage#0 entry).

* jp/index-with-corrupt-stages:
  read_index_unmerged(): remove unnecessary loop index adjustment
  read_index_from(): catch out of order entries when reading an index file
read-cache.c