summaryrefslogtreecommitdiff
path: root/t/t7612-merge-verify-signatures.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7612-merge-verify-signatures.sh')
-rwxr-xr-xt/t7612-merge-verify-signatures.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/t/t7612-merge-verify-signatures.sh b/t/t7612-merge-verify-signatures.sh
index e797c74112..d99218a725 100755
--- a/t/t7612-merge-verify-signatures.sh
+++ b/t/t7612-merge-verify-signatures.sh
@@ -23,7 +23,7 @@ test_expect_success GPG 'create signed commits' '
echo 3 >bar && git add bar &&
test_tick && git commit -S -m "bad on side" &&
git cat-file commit side-bad >raw &&
- sed -e "s/bad/forged bad/" raw >forged &&
+ sed -e "s/^bad/forged bad/" raw >forged &&
git hash-object -w -t commit forged >forged.commit &&
git checkout initial &&
@@ -103,4 +103,11 @@ test_expect_success GPG 'merge commit with bad signature with merge.verifySignat
git merge --no-verify-signatures $(cat forged.commit)
'
+test_expect_success GPG 'merge unsigned commit into unborn branch' '
+ test_when_finished "git checkout initial" &&
+ git checkout --orphan unborn &&
+ test_must_fail git merge --verify-signatures side-unsigned 2>mergeerror &&
+ test_i18ngrep "does not have a GPG signature" mergeerror
+'
+
test_done