From: Junio C Hamano <gitster@pobox.com>
To: <rsbecker@nexbridge.com>
Cc: "'Git Mailing List'" <git@vger.kernel.org>,
"'M Hickford'" <mirth.hickford@gmail.com>
Subject: Re: Suggestion: error "tag ... already exists" should distinguish between tagging different or same commit:
Date: Fri, 11 Jul 2025 12:08:22 -0700 [thread overview]
Message-ID: <xmqq34b21r6h.fsf@gitster.g> (raw)
In-Reply-To: <00ca01dbef94$b155f380$1401da80$@nexbridge.com> (rsbecker@nexbridge.com's message of "Mon, 7 Jul 2025 19:12:58 -0400")
<rsbecker@nexbridge.com> writes:
> Considering that git tag T O will generally require a git push
> --force and always a git pull --force in order to update tags on
> the upstream and receiving an update to the tag locally, I think
> requiring git tag --force T O when O is different from the current
> tag is a reasonable idea from a consistency standpoint. I do
> support the notion of git tag T O not requiring a --force if O is
> already where the tag is pointing.
Yup, that is essentially the idea behind that patch.
> The only counter case I can really see in this is when -s is used
> to allow the sign to be updated but even then, does --force really
> change anything when only signing (I think not) because O does not
> change.
In "git tag -s T O" (or "-a" for that matter), O may not change, but
the resulting tag object would certainly be different from the
object that is pointed at by the existing tag reference T, due to
tagger identity and the message in the tag being different from the
original. So even without O changing ...
> If O changes when signing, I think that --force is almost
> essential to avoid messing up the signatures.
... we would require --force and that would be a good thing.
next prev parent reply other threads:[~2025-07-11 19:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq34b21r6h.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mirth.hickford@gmail.com \
--cc=rsbecker@nexbridge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).