git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "McHenry, Matt" <mmchenry@carnegielearning.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: RE: recovering from "unordered stage entries in index" error
Date: Thu, 21 May 2015 09:19:11 -0400	[thread overview]
Message-ID: <D377A9280DB18546A2471214D5CBB0E908599F7E02@exchdb01> (raw)
In-Reply-To: <CACsJy8AS-9Cv6V=OKTckpnqd6OGsmvRy17TLoikT4QkA0sRofg@mail.gmail.com>

> This message can be improved to show what entries have this problem.

	Yes, that would definitely be a start.  :)

> But then I don't see any way to recover the index manually. ls-files
> will die too. Perhaps we should be gentle in this case: show warnings

	Actually, ls-files succeeds on my broken index:

$ git ls-files > /dev/null
$ echo $?
0

	Could I do something with 'git read-tree' to force creation of a new valid index?  I guess 'git clone' would work too, except that I have 'git svn' metadata that I'd need to preserve.

> instead of aborting the program and internally reorder the index. I
> think, unless you have multiple entries with the same stage, the
> recovered index should run well. The broken index could be renamed to
> index.broken or something for later analysis, or we forbid writing the
> reordered index to disk.
> 
> Hmm?
> 
> > write-tree: command returned error: 128
> >
> >         'git status' shows a few untracked files but is otherwise clean.
> >
> >         It looks like this check was introduced in
> 15999d0be8179fb7a2e6eafb931d25ed65df50aa, with the summary
> "read_index_from(): catch out of order entries when reading an index file"
> (first appearing in 2.2.0).
> >
> >         Mailing list discussion looked like it implicated third-party
> tools.  I don't recall running any other tools on this repo; it doesn't do
> much day-to-day other than a long series of 'git svn fetch'es.  (But it's
> been around for a couple of years, so who knows.)
> >
> >         At any rate, what can I do to recover from this situation?  I
> tried to locate a path with multiple index entries like this, but got no
> results:
> >
> > $ git ls-files -s | cut -f 2-100 | sort | uniq -c | grep -v '^[ \t]*1 '
> >
> >         (I originally posted on SO at
> http://stackoverflow.com/questions/30264826/; I'll update that with any
> solutions that come up here, to ease future googling.)
> > --
> > To unsubscribe from this list: send the line "unsubscribe git" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
> 
> 
> --
> Duy

  reply	other threads:[~2015-05-21 13:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19 13:48 recovering from "unordered stage entries in index" error McHenry, Matt
2015-05-19 15:19 ` Junio C Hamano
2015-05-19 16:51   ` McHenry, Matt
2015-05-21  9:56 ` Duy Nguyen
2015-05-21 13:19   ` McHenry, Matt [this message]
2015-05-21 16:49   ` Junio C Hamano
2015-05-22  0:17     ` Duy Nguyen
2015-05-22 18:56       ` McHenry, Matt
2015-05-23  2:06         ` Duy Nguyen
2015-05-23  2:47           ` McHenry, Matt
2015-05-24  9:52             ` Duy Nguyen
2015-05-26 13:28               ` McHenry, Matt
2015-05-26 13:37                 ` Duy Nguyen
     [not found]           ` <805ACAFCB18CC2408F45D98ABEC64B650A06EC538B@exchdb01>
2015-05-23 21:36             ` McHenry, Matt
2015-05-22 19:24 ` Junio C Hamano
2015-05-22 19:57   ` McHenry, Matt
2015-05-23 17:06     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D377A9280DB18546A2471214D5CBB0E908599F7E02@exchdb01 \
    --to=mmchenry@carnegielearning.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).