Merge branch 'as/config-doc-markup-fix'
[gitweb.git] / t / t4151-am-abort.sh
index 05bdc3ee49408ac1ab35fe54d0b3bfbe401bf7cf..ea5ace99a14f7f31b63dfd9cf25123725a525519 100755 (executable)
@@ -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