git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Laurent Arnoud <laurent@spkdev.net>, git@vger.kernel.org
Subject: Re: [PATCH v2] Add the tag.gpgsign option to sign all created tags
Date: Mon, 21 Mar 2016 15:53:48 -0400	[thread overview]
Message-ID: <20160321195348.GA31650@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqq7fgwnzuv.fsf@gitster.mtv.corp.google.com>

On Sun, Mar 20, 2016 at 10:50:48PM -0700, Junio C Hamano wrote:

> > Support `--no-sign` option to countermand configuration `tag.gpgsign`.
> 
> That sound quite counter-intuitive.
> [...]

I was the one who suggested --no-sign, as we usually like to have a way
to countermand the config. But having read your message, I agree that is
probably not the right mental model.

In particular, this:

> 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.

makes sense to me (though like you, I do not necessarily think it is a
good idea and would not use it myself).

Another similar approach would be to collapse this down to a single
variable that selects from the options. IOW:

  1. Add --lightweight for explicitly adding a lightweight tag.

  2. When we are creating a tag and none of "-a", "-s", or
     "--lightweight" is given, use the default given in
     tag.defaultTagType (or whatever we call it), which can
     be "lightweight", "annotated", or "signed".

  3. tag.defaultTagType defaults to "lightweight".

That is conceptually simpler to me, with the main differences being:

  - in yours, the second config would mean that an explicit "-a" implies
    "-s" (unless the user says --no-sign).

  - in mine, there is no way to kick in the signing _only_ when we are
    annotating. If you configure "signed", then you have to explicitly
    say "--lightweight" for lightweight tags.

I dunno. It sounds like Laurent would set it to "signed", and that would
do what he wants. But like I said, I would not plan to use the feature
myself, and I could see it ending up a little bit annoying when you _do_
want a lightweight tag.

-Peff

      parent reply	other threads:[~2016-03-21 19:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-19 18:23 [PATCH] Add the tag.gpgsign option to sign all created tags Laurent Arnoud
2016-03-20  4:29 ` Jeff King
2016-03-20 12:20   ` Laurent Arnoud
2016-03-20 16:52     ` Jeff King
2016-03-20 17:44       ` Laurent Arnoud
2016-03-20 15:07   ` [PATCH v2] " Laurent Arnoud
2016-03-20 16:38     ` Ramsay Jones
2016-03-21  5:50     ` Junio C Hamano
2016-03-21 19:29       ` Laurent Arnoud
2016-03-21 19:43         ` Junio C Hamano
2016-03-21 20:01           ` Laurent Arnoud
2016-03-21 20:04           ` Jeff King
2016-03-21 20:50           ` [PATCH v4] Add the tag.gpgsign option to sign annotated tags Laurent Arnoud
2016-03-21 21:26             ` Junio C Hamano
2016-03-22 19:36               ` [PATCH v5] Add the option to force " Laurent Arnoud
2016-03-22 19:48                 ` Junio C Hamano
2016-03-22 20:07                   ` Laurent Arnoud
2016-03-22 20:41                   ` [PATCH v6] " Laurent Arnoud
2016-03-21 22:06           ` [PATCH v2] Add the tag.gpgsign option to sign all created tags Junio C Hamano
2016-03-21 19:32       ` [PATCH v3] Add the tag.gpgsign option to sign annotated tags Laurent Arnoud
2016-03-21 19:42         ` Jeff King
2016-03-21 19:53       ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160321195348.GA31650@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=laurent@spkdev.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).