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
Mehul Jain <mehul.jain2029@gmail.com>
Date
May 27, 2016, 06:08 UTC
Message-ID
<CA+DCAeTnkTRnmscduio1-buKd2gNcaScYkLY7YfEQ+_Cm=Z28Q@mail.gmail.com>
In-Reply-To
<xmqqiny0wx8m.fsf@gitster.mtv.corp.google.com>
On Thu, May 26, 2016 at 10:52 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 37 quoted lines
> Jeff King <peff@peff.net> writes:
>
>> On Thu, May 26, 2016 at 06:36:47PM +0530, Mehul Jain wrote:
>>
>>> 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).
>
> I agree that the proposed commit log message should be updated to
> say so.
>
> Because we do not want .showsignature configuration to affect
> rev-list nor format-patch, and we will not make "--show-sig" the
> default for them either.  From that point of view, there is no
> reason for them to know about the "--no-show-signature" option.
>
> 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 ...
>
> If we are updating the log message in the final submission of this
> patch, we'd want it to be clear that the presence of this option is
> not an excuse to introduce .showsignature that affects rev-list
> later to make sure we do not have to waste our time rejecting such a
> patch in the future.

Currently, with the [patch 1/2], only git-show, git-log, git-whatchanged and git-reflog are able to learn about log.showsignature config variable. But commands which will learn about "--no-show-signature" with [patch 2/2] are notably a super-set of above mentioned commands. Introduction of this option should not give an impression that we might need log.showSignature for commands like git-format-patch etc, and it will definitely be a wise decision to convey the same in the commit message of this patch. I will do the necessary change.

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. To do this we can introduce a new member "no_show_signature" in struct rev_info, and use this variable further to modify the value of value of "rev.show_signature" after init_revision() is called. This way we can selectively decide which commands should learn about "--no-show-signature". This may be a bad idea because we will have two variables in rev_info, for option --[no]-show-signature. Any thoughts?

Thanks, Mehul

Previous: Junio C HamanoNext: Junio C Hamano
Message 15 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.