From: "Mkrtchyan, Tigran" <tigran.mkrtchyan@desy.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git <git@vger.kernel.org>, Jonathan Nieder <jrnieder@gmail.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH v3] tag: add tag.gpgSign config option to force all tags be GPG-signed
Date: Wed, 5 Jun 2019 22:12:09 +0200 (CEST) [thread overview]
Message-ID: <1933659713.10490718.1559765529240.JavaMail.zimbra@desy.de> (raw)
In-Reply-To: <xmqqv9xkroc5.fsf@gitster-ct.c.googlers.com>
----- Original Message -----
> 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 6:25:46 PM
> Subject: Re: [PATCH v3] tag: add tag.gpgSign config option to force all tags be GPG-signed
> Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> writes:
>
>> As many CI/CD tools don't allow to control command line options when
>> executing `git tag` command, a default value in the configuration file
>> will allow to enforce tag signing if required.
Must of them blindly execute git commands with some hard-coded combination of
options. It's clear to me, that they are the source of the problem, but
git can be the solution.
>
> Hmm. Would these "many" tools still allow arbigrary configuration
> set to affect their operation? It sounds like a bigger issue but it
> is a separate one.
>
>> The new config-file option tag.gpgSign enforces signed tags. Additional
>> ...
>> will skip the signing step.
>
> This paragraph is well written.
>
>> The combination of -u <key-id> and --no-sign not allowed.
>
> This sentence lacks a verb. Perhaps s/not allowed/is &/.
>
Jup. Sorry.
> 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,
> where
>
> git tag -u key # "-u key" implies "-s"
>
> git tag -u key --no-sign # "--no-sign' trumps the implied "-s"
>
> git tag --no-sign -u key # "-u key"'s implication of "-s" trumps the
> # earlier "--no-sign"
>
> and having "[tag] gpgsign" simply adds to the implication early in
> the chain to be overridden by later command line options.
>
> Let's explain why "you cannot give -u <key> and --no-sign at the
> same time" is better than "the last one wins".
This is matter of convention. I never pay attention to the order of options
on the git command line, but I don't put conflicting options either, I hope.
Does git already have position depended options? If yes, then fine with me.
Otherwise, I don't want to introduce ambiguity. Yes, less ambiguity is my
answer to why it's better than "the last one wins".
>
>> diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
>> index a74e7b926d..2e5599a67f 100644
>> --- a/Documentation/git-tag.txt
>> +++ b/Documentation/git-tag.txt
>> @@ -64,6 +64,13 @@ OPTIONS
>> -s::
>> --sign::
>> Make a GPG-signed tag, using the default e-mail address's key.
>> + The default behavior of tag GPG-signing is controlled by `tag.gpgSign`
>> + configuration variable if it exists, or disabled oder otherwise.
>> + See linkgit:git-config[1].
>> +
>> +--no-sign::
>> + Override `tag.gpgSign` configuration variable that is
>> + set to force each and every tag to be signed.
>>
>> -u <keyid>::
>> --local-user=<keyid>::
>
> If we justify "-u and --no-sign do not mix", that design needs to be
> explained to the end users in the documentation, not just in the
> proposed log messsage.
Make sense.
Thanks,
Tigran.
next prev parent reply other threads:[~2019-06-05 20:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <60741736.3439901.1509090074292.JavaMail.zimbra@desy.de>
2019-06-04 11:43 ` config option to force all tags be GPG-signed - comeback Tigran Mkrtchyan
2019-06-04 11:43 ` [PATCH v2] tag: add tag.gpgSign config option to force all tags be GPG-signed Tigran Mkrtchyan
2019-06-04 14:33 ` Johannes Schindelin
2019-06-04 16:04 ` Mkrtchyan, Tigran
2019-06-05 15:53 ` [PATCH v3] " Tigran Mkrtchyan
2019-06-05 16:21 ` Todd Zullinger
2019-06-05 16:25 ` Junio C Hamano
2019-06-05 20:12 ` Mkrtchyan, Tigran [this message]
2019-06-05 20:46 ` Junio C Hamano
2019-06-05 20:50 ` Mkrtchyan, Tigran
2019-06-05 20:57 ` Junio C Hamano
2019-06-05 21:09 ` Mkrtchyan, Tigran
2019-06-05 21:33 ` [PATCH v4] " Tigran Mkrtchyan
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1933659713.10490718.1559765529240.JavaMail.zimbra@desy.de \
--to=tigran.mkrtchyan@desy.de \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).