git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Suggestion: error "tag ... already exists" should distinguish between tagging different or same commit:
@ 2025-06-09  7:00 M Hickford
  2025-06-09 18:42 ` Junio C Hamano
  0 siblings, 1 reply; 14+ messages in thread
From: M Hickford @ 2025-06-09  7:00 UTC (permalink / raw)
  To: Git Mailing List

Hi. Presently, the error "tag ... already exists" doesn't distinguish
between tagging the same commit or a different commit:

     >git tag hello v1.9.5

     >git tag hello v1.9.5
     fatal: tag 'hello' already exists

     >git tag hello v2.0.0
     fatal: tag 'hello' already exists

To inform the user, it would be nice to distinguish these cases, perhaps:

     >git tag hello v1.9.5
     fatal: tag 'hello' already exists pointing at
d4e6038a068d0aecd5ec28c83afbfc6d4903092f

     >git tag hello v2.0.0
     fatal: tag 'hello' already exists but points at
18a07354e33f86c8349ffdc300d9087876658264

The second error is typically more concerning than the first.

What do you think?

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-07-11 21:40 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-09  7:00 Suggestion: error "tag ... already exists" should distinguish between tagging different or same commit: M Hickford
2025-06-09 18:42 ` Junio C Hamano
2025-06-09 19:37   ` Hilco Wijbenga
2025-06-09 20:15     ` Andreas Schwab
2025-06-09 20:19     ` Junio C Hamano
2025-06-09 21:03       ` Hilco Wijbenga
2025-06-10  7:00   ` M Hickford
2025-06-10 14:51     ` Junio C Hamano
2025-07-07 22:24       ` Junio C Hamano
2025-07-07 23:12         ` rsbecker
2025-07-11 19:08           ` Junio C Hamano
2025-07-11 19:10       ` [PATCH] tag: allow idempotent "git tag" without "--force" Junio C Hamano
2025-07-11 20:57         ` Justin Tobler
2025-07-11 21:40           ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).