git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* "git am --abort" screwing up index?
@ 2015-08-16 19:46 Linus Torvalds
  2015-08-16 23:33 ` Linus Torvalds
  0 siblings, 1 reply; 9+ messages in thread
From: Linus Torvalds @ 2015-08-16 19:46 UTC (permalink / raw)
  To: Junio C Hamano, Paul Tan; +Cc: Git Mailing List

So I just noticed while applying a patch with "git am" when I had a
dirty tree, and I ended up getting a failure and starting over:

   [torvalds@i7 linux]$ git am --abort
   [torvalds@i7 linux]$ git reset --hard
   Checking out files: 100% (50794/50794), done.0794)
   HEAD is now at 1efdb5f0a924 Merge tag 'scsi-fixes' of
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

and the thing I reacted to is that the "git reset --hard" re-checked
out all the files.

That implies that "git am --abort" ended up leaving the index in a bad
state, presumably it re-did the index entirely from HEAD, without
filling it in with the stat() details from the old index.

Maybe it has always done this, and I just haven't noticed (I usually
_just_ do the "git reset --hard" thing, don't ask me why I wanted to
be doubly sure this time). But maybe it's an effect of the new
built-in "am".

I'm about to go out and don't have time to debug this any further
right now, but I'll try to get back to it later. I thought I'd send
out this email in case it makes Paul goes "ahh, yes.. obvious"

Not a big deal - things *work* fine. But forcing checking out every
file obviously also means that subsequent builds end up being slowed
down etc.,.

                  Linus

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-08-19 17:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-16 19:46 "git am --abort" screwing up index? Linus Torvalds
2015-08-16 23:33 ` Linus Torvalds
2015-08-17  8:01   ` Johannes Schindelin
2015-08-17  9:48     ` [PATCH] am --abort: merge ORIG_HEAD tree into index Paul Tan
2015-08-17 10:09       ` Johannes Schindelin
2015-08-17 14:54       ` Linus Torvalds
2015-08-17 19:33       ` Junio C Hamano
2015-08-19  8:22         ` [PATCH v2] am --skip/--abort: merge HEAD/ORIG_HEAD " Paul Tan
2015-08-19 17:55           ` Junio C Hamano

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 NNTP newsgroup(s).