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

2 messages from 2017-09-14 to 2017-09-14. Participants: Robert P. J. Day, Jeff King.
Thread: https://gitlist.dev/t/46748

## Robert P. J. Day, 2017-09-14 10:08

Subject: should "git tag" option of "-a" conflict with "-s", "-u"?
Message-ID: <alpine.LFD.2.21.1709130741120.2766@localhost.localdomain>
URL: https://gitlist.dev/e/alpine.LFD.2.21.1709130741120.2766%40localhost.localdomain

```

  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?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

```

## Jeff King, 2017-09-14 12:15

Subject: Re: should "git tag" option of "-a" conflict with "-s", "-u"?
Message-ID: <20170914121553.mk4qksus2hqeqlh4@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20170914121553.mk4qksus2hqeqlh4%40sigill.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:

>   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

```
