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

git describe

From
MDMichael Dressel <michaeltilodressel@t-online.de>
Date
Jun 2, 2008, 17:25 UTC
Message-ID
<alpine.LNX.1.10.0806021908210.3330@pollux>
Hi,

git describe does not seam to apply the pattern given by the --match option in case the tag is a soft one. Is that done intentionally?

In addition I wonder if it was possible to introduce an option that would show all tags of a given commit, at least when --exact-match is specified too?

At the moment I'm using git log --decorate in a script to get the above result. Part of the script looks something like this:

  		mytags=`git log --pretty=oneline --max-count=1\
  			--decorate $commit\
  		| awk '
/.*\/tags\/V1\..*/ {
  	sub("^.*[(]","")
  	gsub("tag: ","")
  	sub("[)].*","")
  	gsub(" ","")
  	split($0, tl, ",")
  	for (var in tl)
  	{
  		if (tl[var] ~ /refs\/tags/ && tl[var] ~ V1){
  			sub("refs/tags/","",tl[var])
  			print tl[var]
  		}
  	}
}
'`

Since that is quite clumsy. I would like to use git describe which almost does what I need.

Cheers, Michael

Message 1 of 1 in “git describe”
  1. Michael DresselJun 2, 2008

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.