Re: [PATCH v2.5 2/2] tag: prevent nested tags
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 3, 2019, 08:49 UTC
- Message-ID
- <xmqq7ecbscay.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <xmqqzhp7sfw4.fsf@gitster-ct.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> I am not sure if this is so bad, actually. Why do we need to treat
> it as a mistake? When a command that wants a commit is fed a tag
> (either a tag that directly refers to a commit, or a tag that tags
> another tag that refers to a commit), the command knows how to peel
> so it's not like the user is forced to say "git log T^{commit}".
>
> And if something that *MUST* take a commit refuses to (or more
> likely, forges to) peel a tag down to a commit and yields an error,
> I think that is what needs fixing, not the command that creates a
> tag.
>
> So, I am fairly negative on this change---unless it is made much
> more clear in the doc and/or in the proposed log message what
> practical downside there are to the end users if we do not stop this
> "mistake", that is.Having said all that, I can sort-of see that it may make sense to forbid tagging anything but a commit-ish, either by default, or a "git tag --forbid-no-committish" that can be turned on with a configuration.