Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Minor "git" irritation



On 7/20/23, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> At some point in the past I tagged a revision in my local clone so that I
> could easily run diffs against that initial state.
>
> Now "git describe --tags" returns that tag name, which ends up in
> $ZSH_PATCHLEVEL, which is not correct. "git fetch --tags" does not change
> this.

Perhaps we should change the code in Makefile to not use git describe
--tags; without --tags it will only use annotated or signed tags,
which we do use for release tags. You would almost never annotate a
throwaway tag like the one you created so it should be correct in more
cases.

> However, "git tag --delete $(git describe --tags)" says "tag not found".  I
> don't know how it's possible for describe to return a tag that doesn't
> exist, or how it got that way, but here I am.
>
> How do I get rid of that tag?  I've read the doc for "git fetch --prune
> --prune-tags" but that sounds as if it'll remove other local references
> that don't exist on the origin, which is not what I want.

Like the other reply said, you want just the name of the tag, so if
your ZSH_PATCHLEVEL is sometag-293-g238abc then you want just "git tag
-d sometag", you should also be able to tab complete it :).

-- 
Mikael Magnusson




Messages sorted by: Reverse Date, Date, Thread, Author