summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-11-18 09:23:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-18 09:23:54 (GMT)
commit6d2035ee605980efa9915e10d35e7a355fc74077 (patch)
tree5d33f09a10185d66398070e26bcaf864f55709bd /t
parent39847644adb3678da91048b2ac6ebc2b3c475f3a (diff)
parent01a31f3bcaae8b62e5e11ee12d7b1606700f0721 (diff)
downloadgit-6d2035ee605980efa9915e10d35e7a355fc74077.zip
git-6d2035ee605980efa9915e10d35e7a355fc74077.tar.gz
git-6d2035ee605980efa9915e10d35e7a355fc74077.tar.bz2
Merge branch 'jk/verify-sig-merge-into-void'
"git merge" and "git pull" that merges into an unborn branch used to completely ignore "--verify-signatures", which has been corrected. * jk/verify-sig-merge-into-void: pull: handle --verify-signatures for unborn branch merge: handle --verify-signatures for unborn branch merge: extract verify_merge_signature() helper
Diffstat (limited to 't')
-rwxr-xr-xt/t5573-pull-verify-signatures.sh7
-rwxr-xr-xt/t7612-merge-verify-signatures.sh7
2 files changed, 14 insertions, 0 deletions
diff --git a/t/t5573-pull-verify-signatures.sh b/t/t5573-pull-verify-signatures.sh
index 747775c..3e9876e 100755
--- a/t/t5573-pull-verify-signatures.sh
+++ b/t/t5573-pull-verify-signatures.sh
@@ -78,4 +78,11 @@ test_expect_success GPG 'pull commit with bad signature with --no-verify-signatu
git pull --ff-only --no-verify-signatures bad 2>pullerror
'
+test_expect_success GPG 'pull unsigned commit into unborn branch' '
+ git init empty-repo &&
+ test_must_fail \
+ git -C empty-repo pull --verify-signatures .. 2>pullerror &&
+ test_i18ngrep "does not have a GPG signature" pullerror
+'
+
test_done
diff --git a/t/t7612-merge-verify-signatures.sh b/t/t7612-merge-verify-signatures.sh
index e2b1df8..d99218a 100755
--- a/t/t7612-merge-verify-signatures.sh
+++ b/t/t7612-merge-verify-signatures.sh
@@ -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