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

Re: should "git tag" option of "-a" conflict with "-s", "-u"?

From
Jeff King <peff@peff.net>
Date
Sep 14, 2017, 12:15 UTC
Message-ID
<20170914121553.mk4qksus2hqeqlh4@sigill.intra.peff.net>
In-Reply-To
<alpine.LFD.2.21.1709130741120.2766@localhost.localdomain>
On Thu, Sep 14, 2017 at 06:08:10AM -0400, Robert P. J. Day wrote:
Show 16 quoted lines
>   just noticed in "man git-tag":
> 
>   1)  "-a" explicitly claims to create an unsigned tag
>   2)  both "-s" and "-u" both claim to create signed tags
> 
> should that mean that it should be an error to try to use "-a" in
> combination with either of "-u" or "-s"? the synopsis does suggest
> that you can use only one of those at a time:
> 
>   git tag [-a | -s | -u <keyid>] ...
> 
> but i tested with (from memory) using both "-a" and "-s", and tag
> actually tried to do it, but failed simply because i had no key.
> clearly, though, it was making the attempt.
> 
>   can someone clarify this?

I think the documentation could be a little more clear. "-a" just asks to create a tag object, rather than a "lightweight" tag. Using "-s" asks for a signature, which requires having a tag object, and thus implies "-a".

So there's no point in using the two together (since "-s" already implies "-a"), but it also doesn't hurt to do so.

-Peff
Previous: Robert P. J. Day
Message 2 of 2 in “should "git tag" option of "-a" conflict with "-s", "-u"?”
  1. Robert P. J. DaySep 14, 2017
  2. Jeff KingSep 14, 2017

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.