Code

Merge branch 'jc/maint-1.6.0-read-tree-overlay' into maint
[git.git] / t / t4252-am-options.sh
index 5fdd1885820927f32822019ccde52e6b783e31eb..f603c1b1336c4a00889177376d9b51077c9cc2ac 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-test_description='git am not losing options'
+test_description='git am with options and not losing them'
 . ./test-lib.sh
 
 tm="$TEST_DIRECTORY/t4252"
@@ -66,4 +66,13 @@ test_expect_success 'apply to a funny path' '
        test -f "$with_sq/file-5"
 '
 
+test_expect_success 'am --reject' '
+       rm -rf .git/rebase-apply &&
+       git reset --hard initial &&
+       test_must_fail git am --reject "$tm"/am-test-6-1 &&
+       grep "@@ -1,3 +1,3 @@" file-2.rej &&
+       test_must_fail git diff-files --exit-code --quiet file-2 &&
+       grep "[-]-reject" .git/rebase-apply/apply-opt
+'
+
 test_done