zsh-workers
 help / color / mirror / code / Atom feed
* Minor "git" irritation
@ 2023-07-20  5:58 Bart Schaefer
  2023-07-20  7:57 ` Axel Beckert
  2023-07-20  9:41 ` Mikael Magnusson
  0 siblings, 2 replies; 4+ messages in thread
From: Bart Schaefer @ 2023-07-20  5:58 UTC (permalink / raw)
  To: Zsh hackers list

[-- Attachment #1: Type: text/plain, Size: 709 bytes --]

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.

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.

Google search is not helping.  Thanks.

[-- Attachment #2: Type: text/html, Size: 931 bytes --]

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

* Re: Minor "git" irritation
  2023-07-20  5:58 Minor "git" irritation Bart Schaefer
@ 2023-07-20  7:57 ` Axel Beckert
  2023-07-20  9:41 ` Mikael Magnusson
  1 sibling, 0 replies; 4+ messages in thread
From: Axel Beckert @ 2023-07-20  7:57 UTC (permalink / raw)
  To: zsh-workers

Hi Bart,

On Wed, Jul 19, 2023 at 10:58:32PM -0700, Bart Schaefer wrote:
> Now "git describe --tags" returns that tag name,

For me, "git describe --tags" usually does _not_ return git tags but
git tags with some information added how far you are away from the
next tag:

  ~/zsh/zsh-upstream → git describe --tags
  local-test-3-g5ec469503

"local-test" is the tag and "3" the amount of commits since then and
"5ec469503" the current HEAD commit id (beginning).

> However, "git tag --delete $(git describe --tags)" says "tag not
> found".

That's to be expected for the above mentioned reasons unless you check
out that tag first.

> 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.

It does not return tags. I think that's the problem here. :-)

		Kind regards, Axel
-- 
PGP: 2FF9CD59612616B5      /~\  Plain Text Ribbon Campaign, http://arc.pasp.de/
Mail: abe@deuxchevaux.org  \ /  Say No to HTML in E-Mail and Usenet
Mail+Jabber: abe@noone.org  X
https://axel.beckert.ch/   / \  I love long mails: https://email.is-not-s.ms/


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

* Re: Minor "git" irritation
  2023-07-20  5:58 Minor "git" irritation Bart Schaefer
  2023-07-20  7:57 ` Axel Beckert
@ 2023-07-20  9:41 ` Mikael Magnusson
  2023-07-26  2:17   ` Bart Schaefer
  1 sibling, 1 reply; 4+ messages in thread
From: Mikael Magnusson @ 2023-07-20  9:41 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Zsh hackers list

On 7/20/23, Bart Schaefer <schaefer@brasslantern.com> 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


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

* Re: Minor "git" irritation
  2023-07-20  9:41 ` Mikael Magnusson
@ 2023-07-26  2:17   ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2023-07-26  2:17 UTC (permalink / raw)
  To: Zsh hackers list

On Thu, Jul 20, 2023 at 2:41 AM Mikael Magnusson <mikachu@gmail.com> wrote:
>
> Perhaps we should change the code in Makefile to not use git describe
> --tags; without --tags it will only use annotated or signed tags,

Or perhaps "git describe --tags --match zsh*" if annotating is not wanted.


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

end of thread, other threads:[~2023-07-26  2:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-20  5:58 Minor "git" irritation Bart Schaefer
2023-07-20  7:57 ` Axel Beckert
2023-07-20  9:41 ` Mikael Magnusson
2023-07-26  2:17   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).