summaryrefslogtreecommitdiff
path: root/t/t3435-rebase-gpg-sign.sh
diff options
context:
space:
mode:
authorSamuel Čavoj <samuel@cavoj.net>2020-10-17 23:15:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-10-18 20:08:32 (GMT)
commit19dad040ed19761e8d6d63b4efd03ad846b81d06 (patch)
tree21721f08b919d84675848a3979179199f6525b0c /t/t3435-rebase-gpg-sign.sh
parentae03c97ac0e36a33183562464f9506c8b3a73060 (diff)
downloadgit-19dad040ed19761e8d6d63b4efd03ad846b81d06.zip
git-19dad040ed19761e8d6d63b4efd03ad846b81d06.tar.gz
git-19dad040ed19761e8d6d63b4efd03ad846b81d06.tar.bz2
sequencer: pass explicit --no-gpg-sign to merge
The merge subcommand launched for merges with non-default strategy would use its own default behaviour to decide how to sign commits, regardless of what opts->gpg_sign was set to. For example the --no-gpg-sign flag given to rebase explicitly would get ignored, if commit.gpgsign was set to true. Fix the issue and add a test case excercising this behaviour. Signed-off-by: Samuel Čavoj <samuel@cavoj.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3435-rebase-gpg-sign.sh')
-rwxr-xr-xt/t3435-rebase-gpg-sign.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t3435-rebase-gpg-sign.sh b/t/t3435-rebase-gpg-sign.sh
index a2b7625..2fba21f 100755
--- a/t/t3435-rebase-gpg-sign.sh
+++ b/t/t3435-rebase-gpg-sign.sh
@@ -89,4 +89,11 @@ test_expect_success 'rebase -r, merge strategy, commit.gpgsign=false --gpg-sign
git verify-commit HEAD
'
+test_expect_success "rebase -r, merge strategy, commit.gpgsign=true --no-gpg-sign won't sign commit" '
+ git reset --hard merged &&
+ git config commit.gpgsign true &&
+ git rebase -fr --no-gpg-sign -s resolve --root &&
+ test_must_fail git verify-commit HEAD
+'
+
test_done