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

Re: [PATCH v2] Add the tag.gpgsign option to sign all created tags

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 21, 2016, 05:50 UTC
Message-ID
<xmqq7fgwnzuv.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160320150703.GB5139@spk-laptop>
Laurent Arnoud <laurent@spkdev.net> writes:
> The `tag.gpgsign` config option allows to sign all
> commits automatically.

I presume that you meant "all annotated tags" here. But I am not sure it this is sensible.

> Support `--no-sign` option to countermand configuration `tag.gpgsign`.
That sound quite counter-intuitive.
    $ git tag -s -m "my message" v1.0
is an explicit request to create a signed tag, as opposed to
    $ git tag -a -m "my message" v1.0
is an explicit request to create an unsigned annotated tag.  So 
I think a short-hand
    $ git tag -m "my message" v1.0

falls back to annotated and not signed tag, and I can understand if the patch is about allowing the user to tweak this fallback to create signed tag instead.

So I do not see why you need a new --no-sign option at all. If you have the configuration and you do want to create an unsigned annotated tag one-shot, all you need is to explicitly ask for "-a" i.e.

    $ git tag -a -m "my message" v1.0
isn't it?

If you are forcing users to always leave a message and then further forcing users to always sign with the single new configuration, i.e.

    $ git tag v1.0
    ... opens the editor to ask for a message ...
    ... then makes the user sign with GPG ...
then I would first have to say that is a bad idea.

I can sort-of understand (but do not necessarily agree that it is a good idea) adding new two configurations, i.e.

 - "even without -a/-s, force the user to annotate the tag" is one
   configuration, and
 - "even when the user did not say -s, force the user to sign an
   annotated tag" is the other.

And with such a system, I can see why you would need an option "--lightweight" to force creation of a light-weight tag (i.e. to countermand the first one). You can view this new option as something that sits next to existing -a/-s. The current system lets user choose among the three variants (lightweight, annotated and signed) by not giving any, giving -a, and giving -s option respectively, but with the "--lightweight" option, the user can ask for one of the three explicitly, as opposed to using "lack of either -a/-s" as a signal to create lightweight one.

And in the context of such a system, "--no-sign" may make sense to override the second configuration (i.e. "force the user to sign an annotated tag").

But otherwise, adding only "--no-sign" does not make much sense to me, as it implies "not signing always means annotated", which is not true. It is unclear between lightweight and annotated which one the user who says "--no-sign" really wants.

Previous: Ramsay JonesNext: Laurent Arnoud
Message 8 of 22 in “Add the tag.gpgsign option to sign all created tags”
  1. Add the tag.gpgsign option to sign all created tagsLaurent Arnoud, Mar 19, 2016
  2. Jeff KingMar 20, 2016
  3. Laurent ArnoudMar 20, 2016
  4. Jeff KingMar 20, 2016
  5. Laurent ArnoudMar 20, 2016
  6. Add the tag.gpgsign option to sign all created tagsLaurent Arnoud, Mar 20, 2016
  7. Ramsay JonesMar 20, 2016
  8. Junio C HamanoMar 21, 2016
  9. Laurent ArnoudMar 21, 2016
  10. Junio C HamanoMar 21, 2016
  11. Laurent ArnoudMar 21, 2016
  12. Jeff KingMar 21, 2016
  13. Add the tag.gpgsign option to sign annotated tagsLaurent Arnoud, Mar 21, 2016
  14. Junio C HamanoMar 21, 2016
  15. Add the option to force sign annotated tagsLaurent Arnoud, Mar 22, 2016
  16. Junio C HamanoMar 22, 2016
  17. Laurent ArnoudMar 22, 2016
  18. Add the option to force sign annotated tagsLaurent Arnoud, Mar 22, 2016
  19. Junio C HamanoMar 21, 2016
  20. Add the tag.gpgsign option to sign annotated tagsLaurent Arnoud, Mar 21, 2016
  21. Jeff KingMar 21, 2016
  22. Jeff KingMar 21, 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.