t/t7003-filter-branch.sh: use the $( ... ) construct for command substitution
[gitweb.git] / t / t4153-am-resume-override-opts.sh
index 39fac7993e74e14337ff265b1ac432c00897d025..7c013d84d5978edf3760c48e0125c3527c8e09f9 100755 (executable)
@@ -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 &&