diff options
author | Mehul Jain <mehul.jain2029@gmail.com> | 2016-06-22 18:51:26 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-06-24 22:01:13 +0200 |
commit | fce04c3ca695d32c1b3c59e1bfc1fb4019025c72 (patch) | |
tree | fd1d6f953456512d916fa177b1856399732a1cc5 /t/t4202-log.sh | |
parent | log: add "--no-show-signature" command line option (diff) | |
download | git-fce04c3ca695d32c1b3c59e1bfc1fb4019025c72.tar.xz git-fce04c3ca695d32c1b3c59e1bfc1fb4019025c72.zip |
log: add log.showSignature configuration variable
Users may want to always use "--show-signature" while using git-log and
related commands.
When log.showSignature is set to true, git-log and related commands will
behave as if "--show-signature" was given to them.
Note that this config variable is meant to affect git-log, git-show,
git-whatchanged and git-reflog. Other commands like git-format-patch,
git-rev-list are not to be affected by this config variable.
Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4202-log.sh')
-rwxr-xr-x | t/t4202-log.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t4202-log.sh b/t/t4202-log.sh index 449a5275d4..803e1e6b8f 100755 --- a/t/t4202-log.sh +++ b/t/t4202-log.sh @@ -898,6 +898,26 @@ test_expect_success GPG '--no-show-signature overrides --show-signature' ' ! 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 ' |