summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-08-26 15:45:32 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-08-26 15:45:32 -0700
commitb7d2a15b9f5cdbed7e8dbcc3fff0ea1ae92ed764 (patch)
treeaf0c7b8de03f8144f2b020e3bd273cb3cb88893a /t
parentMerge branch 'po/po-readme' (diff)
parentam --skip/--abort: merge HEAD/ORIG_HEAD tree into index (diff)
downloadtgif-b7d2a15b9f5cdbed7e8dbcc3fff0ea1ae92ed764.tar.xz
Merge branch 'pt/am-builtin-abort-fix'
"git am" that was recently reimplemented in C had a performance regression in "git am --abort" that goes back to the version before an attempted (and failed) patch application. * pt/am-builtin-abort-fix: am --skip/--abort: merge HEAD/ORIG_HEAD tree into index
Diffstat (limited to 't')
-rwxr-xr-xt/t4151-am-abort.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t4151-am-abort.sh b/t/t4151-am-abort.sh
index 05bdc3ee49..ea5ace99a1 100755
--- a/t/t4151-am-abort.sh
+++ b/t/t4151-am-abort.sh
@@ -168,4 +168,28 @@ test_expect_success 'am --abort on unborn branch will keep local commits intact'
test_cmp expect actual
'
+test_expect_success 'am --skip leaves index stat info alone' '
+ git checkout -f --orphan skip-stat-info &&
+ git reset &&
+ test_commit skip-should-be-untouched &&
+ test-chmtime =0 skip-should-be-untouched.t &&
+ git update-index --refresh &&
+ git diff-files --exit-code --quiet &&
+ test_must_fail git am 0001-*.patch &&
+ git am --skip &&
+ git diff-files --exit-code --quiet
+'
+
+test_expect_success 'am --abort leaves index stat info alone' '
+ git checkout -f --orphan abort-stat-info &&
+ git reset &&
+ test_commit abort-should-be-untouched &&
+ test-chmtime =0 abort-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