How to recover from a "disordered stages in index" error in git

I just upgraded gitfrom 2.0.5to 2.3.6, and now I cannot run git svn fetchin one of my repositories:

$ git svn fetch
fatal: unordered stage entries in index
write-tree: command returned error: 128

git status shows several unsolicited files, but otherwise clean.

I found a change in which this check was introduced, with a summary of " read_index_from (): disable records when reading the index file " (first appearing in 2.2.0), and some discussion of the mailing list that says, among other things:

I think we were discussing how to protect the broken index file on the left with tools written by other people, so I would not be so surprised if our current set of tools does not allow you to recreate certain breakdowns; -)

I don’t remember to run any other tools for this repo; he does not do much day after day, except for a long series of git svn fetches. (But it has been for several years, so who knows.)

Anyway, what can I do to recover from this situation? I tried to find a path with multiple index entries like this, but did not get any results:

$ git ls-files -s | cut -f 2-100 | sort | uniq -c | grep -v '^[ \t]*1 '
+4
source share
1 answer

What can I do to recover from this situation?

fooobar.com/questions/30769 / ...

something like that

rm .git/index
git add -A
+1
source

All Articles