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

Re: Annotated tags by default?

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 17, 2014, 21:02 UTC
Message-ID
<xmqqppi7l05u.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAHd499Bszq1nw=cu9UZpnodR1ZzmX2Bw2kJr8X13_mEUd7ombA@mail.gmail.com>
Robert Dailey <rcdailey.lists@gmail.com> writes:
Show 5 quoted lines
> 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".

Previous: Robert Dailey
Message 2 of 2 in “Annotated tags by default?”
  1. Robert DaileyJun 17, 2014
  2. Junio C HamanoJun 17, 2014

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.