git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] t4151: demonstrate that builtin am corrupts index' stat data
@ 2015-08-21  8:02 David Aguilar
  2015-08-21  8:02 ` [PATCH 2/3] am: do not corrupt the index stat state David Aguilar
  2015-08-21  8:02 ` [PATCH 3/3] am: rename "struct tree_desc t" to "desc" for readability David Aguilar
  0 siblings, 2 replies; 5+ messages in thread
From: David Aguilar @ 2015-08-21  8:02 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Linus Torvalds, Johannes Schindelin, Paul Tan, Git Mailing List

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

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

end of thread, other threads:[~2015-08-21 16:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-21  8:02 [PATCH 1/3] t4151: demonstrate that builtin am corrupts index' stat data David Aguilar
2015-08-21  8:02 ` [PATCH 2/3] am: do not corrupt the index stat state David Aguilar
2015-08-21 16:37   ` Junio C Hamano
2015-08-21  8:02 ` [PATCH 3/3] am: rename "struct tree_desc t" to "desc" for readability David Aguilar
2015-08-21 16:51   ` 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).