git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] t4151: demonstrate that builtin am corrupts index' stat data

From
David Aguilar <davvid@gmail.com>
Date
Aug 21, 2015, 08:02 UTC
Message-ID
<1440144151-24026-1-git-send-email-davvid@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>
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.5.0.403.gd17121e
Next: David Aguilar
Message 1 of 5 in “t4151: demonstrate that builtin am corrupts index' stat data”
  1. 1/3 t4151: demonstrate that builtin am corrupts index' stat dataDavid Aguilar, Aug 21, 2015
  2. 2/3 am: do not corrupt the index stat stateDavid Aguilar, Aug 21, 2015
  3. Junio C HamanoAug 21, 2015
  4. 3/3 am: rename "struct tree_desc t" to "desc" for readabilityDavid Aguilar, Aug 21, 2015
  5. Junio C HamanoAug 21, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.