From: Johannes Schindelin <johannes.schindelin@gmx.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Junio C Hamano <gitster@pobox.com>, Paul Tan <pyokagan@gmail.com>,
Stefan Beller <sbeller@google.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: "git am --abort" screwing up index?
Date: Mon, 17 Aug 2015 10:01:29 +0200 [thread overview]
Message-ID: <03631611149f05dbcd862b4c1e8e9d6b@www.dscho.org> (raw)
In-Reply-To: <CA+55aFwwD=K-i9d40N5FtnTLT-ApZOzmgnXhnuA=C0zw2eBt3Q@mail.gmail.com>
Hi Linus,
On 2015-08-17 01:33, Linus Torvalds wrote:
> On Sun, Aug 16, 2015 at 12:46 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>>
>> 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 bisected this. It's definitely used to work, and the regression is
> from the new built-in am.
This patch is a reproducer:
-- snipsnap --
From 5323f1c309ad40721e2e19fa9c6ce5ad52d98271 Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Mon, 17 Aug 2015 09:37:39 +0200
Subject: [PATCH] t4151: demonstrate that builtin am corrupts index' stat data
Reported by Linus Torvalds.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
t/t4151-am-abort.sh | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/t/t4151-am-abort.sh b/t/t4151-am-abort.sh
index 05bdc3e..bf2e6f4 100755
--- a/t/t4151-am-abort.sh
+++ b/t/t4151-am-abort.sh
@@ -168,4 +168,16 @@ test_expect_success 'am --abort on unborn branch will keep local commits intact'
test_cmp expect actual
'
+test_expect_failure 'am --abort leaves index stat info alone' '
+ git checkout -f --orphan stat-info &&
+ git reset &&
+ test_commit should-be-untouched &&
+ test-chmtime =0 should-be-untouched.t &&
+ git update-index --refresh &&
+ git diff-files --exit-code --quiet &&
+ test_must_fail git am 0001-*.patch &&
+ git am --abort &&
+ git diff-files --exit-code --quiet
+'
+
test_done
--
2.3.1.windows.1.9.g8c01ab4
next prev parent reply other threads:[~2015-08-17 8:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=03631611149f05dbcd862b4c1e8e9d6b@www.dscho.org \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pyokagan@gmail.com \
--cc=sbeller@google.com \
--cc=torvalds@linux-foundation.org \
/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).