Re: [PATCH v2.5 2/2] tag: prevent nested tags
- From
- Robert Dailey <rcdailey.lists@gmail.com>
- Date
- Apr 3, 2019, 18:26 UTC
- Message-ID
- <CAHd499C9g3yPvs=wuaSuLrW=R09yjT5DcKHfpH9=PYYkAcpuhg@mail.gmail.com>
- In-Reply-To
- <xmqq7ecbscay.fsf@gitster-ct.c.googlers.com>
On Wed, Apr 3, 2019 at 3:50 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 23 quoted lines
>
> Junio C Hamano <gitster@pobox.com> writes:
>
> > 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.I don't really understand what part of the change is a negative for you. Are you saying that `git tag` should peel the tags for you? Or are you saying you don't like nested tagging to be opt-in and an error otherwise?