dir.c: fix missing dir invalidation in untracked code
[gitweb.git] / t / t4153-am-resume-override-opts.sh
index 39fac7993e74e14337ff265b1ac432c00897d025..8ea22d1bcbb8340d32fe87f299a77c98362c3797 100755 (executable)
@@ -53,7 +53,7 @@ test_expect_success '--no-quiet overrides --quiet' '
        # Applying side1 will be quiet.
        test_must_fail git am --quiet side[123].eml >out &&
        test_path_is_dir .git/rebase-apply &&
-       ! test_i18ngrep "^Applying: " out &&
+       test_i18ngrep ! "^Applying: " out &&
        echo side1 >file &&
        git add file &&
 
@@ -64,6 +64,26 @@ test_expect_success '--no-quiet overrides --quiet' '
        test_i18ncmp expected out
 '
 
+test_expect_success '--signoff overrides --no-signoff' '
+       rm -fr .git/rebase-apply &&
+       git reset --hard &&
+       git checkout first &&
+
+       test_must_fail git am --no-signoff side[12].eml &&
+       test_path_is_dir .git/rebase-apply &&
+       echo side1 >file &&
+       git add file &&
+       git am --signoff --continue &&
+
+       # Applied side1 will be signed off
+       echo "Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" >expected &&
+       git cat-file commit HEAD^ | grep "Signed-off-by:" >actual &&
+       test_cmp expected actual &&
+
+       # Applied side2 will not be signed off
+       test $(git cat-file commit HEAD | grep -c "Signed-off-by:") -eq 0
+'
+
 test_expect_success TTY '--reject overrides --no-reject' '
        rm -fr .git/rebase-apply &&
        git reset --hard &&