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

Re: [PATCH v3] tag: add tag.gpgSign config option to force all tags be GPG-signed

From
Mkrtchyan, Tigran <tigran.mkrtchyan@desy.de>
Date
Jun 5, 2019, 21:09 UTC
Message-ID
<2146612842.10496277.1559768996738.JavaMail.zimbra@desy.de>
In-Reply-To
<xmqqzhmvrbr5.fsf@gitster-ct.c.googlers.com>
----- Original Message -----
Show 6 quoted lines
> From: "Junio C Hamano" <gitster@pobox.com>
> To: "Tigran Mkrtchyan" <tigran.mkrtchyan@desy.de>
> Cc: "git" <git@vger.kernel.org>, "Jonathan Nieder" <jrnieder@gmail.com>, "Johannes Schindelin"
> <Johannes.Schindelin@gmx.de>
> Sent: Wednesday, June 5, 2019 10:57:34 PM
> Subject: Re: [PATCH v3] tag: add tag.gpgSign config option to force all tags be GPG-signed
Show 34 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
> 
>> "Mkrtchyan, Tigran" <tigran.mkrtchyan@desy.de> writes:
>>
>>>> But more importantly, I think we should justify why this "not
>>>> allowed" makes sense as the design of the feature. A plausible
>>>> alternative design would simply follow the "last one wins" paradigm,
>>>> ...
>>> This is matter of convention.
>>
>> Oh, if you put it that way, it is quite clear that we should redo
>> this part, as the rest of Git command line processing all pretty
>> much follow "last one wins".  I was mostly curious if there was any
>> strong reason why this combination has to be different.
> 
> One reason why "last one wins" aka "you have a chance to correct
> yourself" is so useful is because people can then use alias to
> define leading options, e.g. with
> 
>    [alias] myfoo = foo --option1 --option2 --option3
> 
> a user can say "git myfoo" to save typing, but in a rare occasion
> where only options 2 and 3 (but not option 1) are desired, can use
> "git myfoo --no-option1" to countermand it.
> 
> Unfortunately, I do not think we can use the same technique for
> options that is given to the "git" potty, e.g. with
> 
>    [alias] paged-status = --paginate status
> 
> you can say "git paged-status" to have your "git status" output sent
> to the pager, but you cannot say "git paged-status --no-pager" to
> defeat that leading option.  We may want to find a way to correct
> it, but it is rather low on the priority scale ;-)
Makes sense. Thanks for that use case, which I actually use myself :).
BTW, `--no-sign` currently doesn't affects `-u <key>` in any order:
```
    if (keyid) {
        opt.sign = 1;
        set_signing_key(keyid);
    }
```

IOW, `-u <key>` is another way to enable signing, what is, actually, consistent with man page:

```
       -u <keyid>, --local-user=<keyid>
           Make a GPG-signed tag, using the given key.
```

I will leave it as-is, I will just describe that tag.gpgSign options doesn't affect '-u' behavior.

Tigran.
Previous: Junio C HamanoNext: Tigran Mkrtchyan
Message 12 of 13 in “config option to force all tags be GPG-signed - comeback”
  1. Tigran MkrtchyanJun 4, 2019
  2. tag: add tag.gpgSign config option to force all tags be GPG-signedTigran Mkrtchyan, Jun 4, 2019
  3. Johannes SchindelinJun 4, 2019
  4. Mkrtchyan, TigranJun 4, 2019
  5. tag: add tag.gpgSign config option to force all tags be GPG-signedTigran Mkrtchyan, Jun 5, 2019
  6. Todd ZullingerJun 5, 2019
  7. Junio C HamanoJun 5, 2019
  8. Mkrtchyan, TigranJun 5, 2019
  9. Junio C HamanoJun 5, 2019
  10. Mkrtchyan, TigranJun 5, 2019
  11. Junio C HamanoJun 5, 2019
  12. Mkrtchyan, TigranJun 5, 2019
  13. tag: add tag.gpgSign config option to force all tags be GPG-signedTigran Mkrtchyan, Jun 5, 2019

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.