Thread (1 message) 1 message, 1 author, 2016-06-15

Re: Annotated tags by default?

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:01:40

Robert Dailey [off-list ref] writes:
Is there a config option or some way for `git tag -a` to be the
default? I could create an alias but would make more sense to have a
config:

git config --global tag.alwaysannotate true
If you really wanted to, you could do the following (and you must to
do all of the following):

 * Introduce "git tag --no-annotate" option, that defeats the effect
   of such a configuration variable.

 * Devise some way to reliably catch scripts that use "git tag"
   without saying what kind of tag they want to create.  Add new
   code to issue a warning message saying that the script will be
   horribly broken when user starts using the configuration variable
   that will be introduced in the future.  This will force them to
   be updated to pass the "--no-annotate" option.

 * Wait for several releases to make sure that no script that want
   to use light-weight tags use "git tag" without "--no-annotate"
   option.

 * Introduce the configuration variable.

I personally do not think it is worth it, and also I do not know what
that "some way to reliably catch" would look like.

We gave short-and-sweet "-a" and "-s" options exactly because we
wanted to make it easy to type them.  Also, "tag -m msg" will DWIM
to "-a".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help