From: Mehul Jain <mehul.jain2029@gmail.com>
To: git@vger.kernel.org
Cc: Austin English <austinenglish@gmail.com>,
Mehul Jain <mehul.jain2029@gmail.com>
Subject: [RFC/PATCH 2/2] log: add "--no-show-signature" command line option
Date: Thu, 26 May 2016 18:36:47 +0530 [thread overview]
Message-ID: <20160526130647.27001-3-mehul.jain2029@gmail.com> (raw)
In-Reply-To: <20160526130647.27001-1-mehul.jain2029@gmail.com>
If "log.showsignature=true", then there is no way to override it using
command line switch.
Teach "git log" and "git show" about "--no-show-signature" command line
option.
Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
---
revision.c | 2 ++
t/t4202-log.sh | 7 +++++++
2 files changed, 9 insertions(+)
diff --git a/revision.c b/revision.c
index d30d1c4..3546ff9 100644
--- a/revision.c
+++ b/revision.c
@@ -1871,6 +1871,8 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
revs->notes_opt.use_default_notes = 1;
} else if (!strcmp(arg, "--show-signature")) {
revs->show_signature = 1;
+ } else if (!strcmp(arg, "--no-show-signature")) {
+ revs->show_signature = 0;
} else if (!strcmp(arg, "--show-linear-break") ||
starts_with(arg, "--show-linear-break=")) {
if (starts_with(arg, "--show-linear-break="))
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 36be9a1..ea24259 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -901,6 +901,13 @@ test_expect_success GPG 'log.showsignature=true behaves like --show-signature' '
test_i18ngrep "gpg: Good signature" actual
'
+test_expect_success GPG '--no-show-signature overrides log.showsignature=true' '
+ git config log.showsignature true &&
+ git log -1 --no-show-signature signed >actual &&
+ test "$(test_i18ngrep "gpg: Signature made" actual)" = "" &&
+ test "$(test_i18ngrep "gpg: Good signature" actual)" = ""
+'
+
test_expect_success GPG '--show-signature overrides log.showsignature=false' '
test_when_finished "git reset --hard && git checkout master" &&
git config log.showsignature false &&
--
2.9.0.rc0.dirty
next prev parent reply other threads:[~2016-05-26 13:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 13:06 [RFC/PATCH 0/2] Introduce "log.showSignature" config variable Mehul Jain
2016-05-26 13:06 ` [RFC/PATCH 1/2] log: add "log.showsignature" configuration variable Mehul Jain
2016-05-26 13:42 ` Remi Galan Alfonso
2016-05-26 15:04 ` Mehul Jain
2016-05-26 15:43 ` Remi Galan Alfonso
2016-05-26 16:06 ` Mehul Jain
2016-05-27 4:01 ` Pranit Bauva
2016-05-26 16:59 ` Jeff King
2016-05-27 6:04 ` Mehul Jain
2016-05-26 13:06 ` Mehul Jain [this message]
2016-05-26 16:32 ` [RFC/PATCH 2/2] log: add "--no-show-signature" command line option Jeff King
2016-05-26 16:42 ` Mehul Jain
2016-05-26 17:01 ` Jeff King
2016-05-26 17:22 ` Junio C Hamano
2016-05-27 6:08 ` Mehul Jain
2016-05-27 17:37 ` Junio C Hamano
2016-05-27 17:48 ` Jeff King
2016-05-27 2:55 ` [RFC/PATCH 0/2] Introduce "log.showSignature" config variable Austin English
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160526130647.27001-3-mehul.jain2029@gmail.com \
--to=mehul.jain2029@gmail.com \
--cc=austinenglish@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).