Re: [RFC/PATCH 2/2] log: add "--no-show-signature" command line option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 27, 2016 at 10:37:16AM -0700, Junio C Hamano wrote:

> Mehul Jain <mehul.jain2029@xxxxxxxxx> writes:
> 
> > On Thu, May 26, 2016 at 10:52 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> >
> >> The only reason why teaching the "--no-show-signature" option to
> >> these commands is a good idea is because it would help people who
> >> create an alias with "--show-sig" in early part of the command line,
> >> e.g.
> >>
> >>         [alias] fp = format-patch --show-signature
> >>
> >> by allowing them to countermand with --no-show-signature, i.e.
> >>
> >>         $ git fp --no-show-signature ...
> >> ...
> >
> > Just out of curiosity, I was thinking that we might be able to teach
> > "--no-show-signature" option only to git-show, git-log, git-whatchanged
> > and git-reflog.
> 
> Yeah, I know it is possible with extra code, but I do not think of a
> good reason why it is necessary.

Not only "not necessary" but "actively worse" in my opinion. We have
--show-signature in revision.c, and that is reason enough to have
--no-show-signature, in case anybody would want to countermand an
earlier request (whether from config that is soon to exist, or from a
previous --show-signature on the command line), or just because somebody
feels like making sure git is doing what they want without bothering to
check the defaults.

We add the "--no-" form by default for all of our bools parsed by
parse-options. The only reason it is not already here is that this
option parsing predates our use of parse-options, and nobody had
bothered to go back and add it. But doing so is a win simply for
consistency if nothing else, IMHO.

I actually think it would be nice to convert all of handle_revision_opt
to parse-options, but that's a non-trivial task. And I certainly
wouldn't want it to hold up this otherwise simple topic.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]