Merge branch 'jk/banned-function'
[gitweb.git] / t / t7510-signed-commit.sh
index 663bf68def8ea0bf32475a9a932c7bc4eed280b8..4e37ff8f169615a893ee5d0594ff056b0284b724 100755 (executable)
@@ -142,8 +142,7 @@ test_expect_success GPG 'show signed commit with signature' '
 
 test_expect_success GPG 'detect fudged signature' '
        git cat-file commit seventh-signed >raw &&
-
-       sed -e "s/seventh/7th forged/" raw >forged1 &&
+       sed -e "s/^seventh/7th forged/" raw >forged1 &&
        git hash-object -w -t commit forged1 >forged1.commit &&
        test_must_fail git verify-commit $(cat forged1.commit) &&
        git show --pretty=short --show-signature $(cat forged1.commit) >actual1 &&
@@ -228,4 +227,11 @@ test_expect_success GPG 'log.showsignature behaves like --show-signature' '
        grep "gpg: Good signature" actual
 '
 
+test_expect_success GPG 'check config gpg.format values' '
+       test_config gpg.format openpgp &&
+       git commit -S --amend -m "success" &&
+       test_config gpg.format OpEnPgP &&
+       test_must_fail git commit -S --amend -m "fail"
+'
+
 test_done