git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git describe relative to a given tag pattern

From
Adam Mercer <ramercer@gmail.com>
Date
Feb 6, 2012, 22:03 UTC
Message-ID
<CA+mfgz0VB9qMHHtoT76zCOiUaH=8egdMDrneQVRBug2waQsGAg@mail.gmail.com>
Hi

I'm trying to use git describe to describe the current status of my tree with respect a given tag, or more specifically the latest tag matching a specific pattern.

My repository has the following tags:

$ git tag -l lal-v* lal-v6.6.0 lal-v6.6.0rc1 lal-v6.6.0rc2 lal-v6.6.1 lal-v6.6.2 $

And I want git describe to use the latest of these tags, so looking at the git describe man page it seems that the --match option can allow me to specify a pattern. This, however, doesn't seem to work:

$ git describe --match=lal-v* HEAD fatal: No tags can describe 'cee13cbb25d0fa38f6e3bc6622bc751ebf35d2f0'. Try --always, or create some tags. $

quoting the pattern has no effect, what am I doing wrong here?
Cheers
Adam
PS: I'm using git-1.7.9
Next: Junio C Hamano
Message 1 of 3 in “git describe relative to a given tag pattern”
  1. Adam MercerFeb 6, 2012
  2. Junio C HamanoFeb 6, 2012
  3. Adam MercerFeb 6, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.