Re: [PATCH] tag: add a config option for setting --annotate by default
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 4, 2017, 05:02 UTC
- Message-ID
- <xmqqlgtm8s5k.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20170204021402.15927-1-davvid@gmail.com>
David Aguilar <davvid@gmail.com> writes:
Show 6 quoted lines
> Make it easier for users to remember to annotate their tags. > Allow setting the default value for "--annotate" via the "tag.annotate" > configuration variable. > > Signed-off-by: David Aguilar <davvid@gmail.com> > ---
I do not care too strongly about this, but I need to point out that this will have fallout to tools and scripts. E.g. if you have this configured and try to create a new tag in gitk, wouldn't this part
if {$msg != {}} {
exec git tag -a -m $msg $tag $id
} else {
exec git tag $tag $id
}try to open an editor somehow to get the message even when $msg is an empty string? I think the same problem already exists for the tag.forceSignAnnotated variable we already have added, though.
Show 16 quoted lines
> diff --git a/Documentation/config.txt b/Documentation/config.txt > index af2ae4cc02..0d562b97e9 100644 > --- a/Documentation/config.txt > +++ b/Documentation/config.txt > @@ -2945,6 +2945,11 @@ submodule.alternateErrorStrategy > as computed via `submodule.alternateLocation`. Possible values are > `ignore`, `info`, `die`. Default is `die`. > > +tag.annotate:: > + A boolean to specify whether annotated tags should be created by > + default. If `--no-annotate` is specified on the command line, > + it takes precedence over this option. > + > tag.forceSignAnnotated:: > A boolean to specify whether annotated tags created should be GPG signed. > If `--annotate` is specified on the command line, it takes