git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jeff King <peff@peff.net>
Date
May 27, 2016, 17:48 UTC
Message-ID
<20160527174807.GA1614@sigill.intra.peff.net>
In-Reply-To
<xmqq4m9js8qb.fsf@gitster.mtv.corp.google.com>
On Fri, May 27, 2016 at 10:37:16AM -0700, Junio C Hamano wrote:
Show 22 quoted lines
> Mehul Jain <mehul.jain2029@gmail.com> writes:
> 
> > On Thu, May 26, 2016 at 10:52 PM, Junio C Hamano <gitster@pobox.com> 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
Previous: Junio C HamanoNext: Austin English
Message 17 of 18 in “Introduce "log.showSignature" config variable”
  1. 0/2 Introduce "log.showSignature" config variableMehul Jain, May 26, 2016
  2. 1/2 log: add "log.showsignature" configuration variableMehul Jain, May 26, 2016
  3. Remi Galan AlfonsoMay 26, 2016
  4. Mehul JainMay 26, 2016
  5. Remi Galan AlfonsoMay 26, 2016
  6. Mehul JainMay 26, 2016
  7. Pranit BauvaMay 27, 2016
  8. Jeff KingMay 26, 2016
  9. Mehul JainMay 27, 2016
  10. 2/2 log: add "--no-show-signature" command line optionMehul Jain, May 26, 2016
  11. Jeff KingMay 26, 2016
  12. Mehul JainMay 26, 2016
  13. Jeff KingMay 26, 2016
  14. Junio C HamanoMay 26, 2016
  15. Mehul JainMay 27, 2016
  16. Junio C HamanoMay 27, 2016
  17. Jeff KingMay 27, 2016
  18. Austin EnglishMay 27, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.