diff options
Diffstat (limited to 't/t4202-log.sh')
-rwxr-xr-x | t/t4202-log.sh | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh index 0b53e56694..e2db47c36e 100755 --- a/t/t4202-log.sh +++ b/t/t4202-log.sh @@ -874,12 +874,15 @@ test_expect_success 'dotdot is a parent directory' ' test_cmp expect actual ' -test_expect_success GPG 'log --graph --show-signature' ' +test_expect_success GPG 'setup signed branch' ' test_when_finished "git reset --hard && git checkout master" && git checkout -b signed master && echo foo >foo && git add foo && - git commit -S -m signed_commit && + git commit -S -m signed_commit +' + +test_expect_success GPG 'log --graph --show-signature' ' git log --graph --show-signature -n1 signed >actual && grep "^| gpg: Signature made" actual && grep "^| gpg: Good signature" actual @@ -904,6 +907,31 @@ test_expect_success GPG 'log --graph --show-signature for merged tag' ' grep "^| | gpg: Good signature" actual ' +test_expect_success GPG '--no-show-signature overrides --show-signature' ' + git log -1 --show-signature --no-show-signature signed >actual && + ! grep "^gpg:" actual +' + +test_expect_success GPG 'log.showsignature=true behaves like --show-signature' ' + test_config log.showsignature true && + git log -1 signed >actual && + grep "gpg: Signature made" actual && + grep "gpg: Good signature" actual +' + +test_expect_success GPG '--no-show-signature overrides log.showsignature=true' ' + test_config log.showsignature true && + git log -1 --no-show-signature signed >actual && + ! grep "^gpg:" actual +' + +test_expect_success GPG '--show-signature overrides log.showsignature=false' ' + test_config log.showsignature false && + git log -1 --show-signature signed >actual && + grep "gpg: Signature made" actual && + grep "gpg: Good signature" actual +' + test_expect_success 'log --graph --no-walk is forbidden' ' test_must_fail git log --graph --no-walk ' |