Re: [RFC/PATCH 2/2] log: add "--no-show-signature" command line option
- From
Jeff King <peff@peff.net>
- Date
- May 26, 2016, 16:32 UTC
- Message-ID
- <20160526163241.GC18210@sigill.intra.peff.net>
- In-Reply-To
- <20160526130647.27001-3-mehul.jain2029@gmail.com>
On Thu, May 26, 2016 at 06:36:47PM +0530, Mehul Jain wrote:
Show 5 quoted lines
> 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.
I think this is teaching all of the revision machinery about it (which is a good thing).
Show 14 quoted lines
> 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)" = "" > +'
Perhaps it would be more robust to simply grep for "gpg:". We should not be seeing any gpg-related lines in the output. It probably isn't that big a deal in practice, though. If the output from gpg changes, this test could report a false success, but all of the other nearby tests would show a breakage, so somebody would probably notice.
-Peff