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

git describe returns tags including 'refs/tags/

From
VTVoie, Per Erlend Torbergsen <per.erlend.voie@dnvgl.com>
Date
Oct 24, 2017, 08:12 UTC
Message-ID
<DB6PR0202MB28074CB67408334285264588A4470@DB6PR0202MB2807.eurprd02.prod.outlook.com>
In-Reply-To
<DB6PR0202MB2807FB243E7D7A574D555F16A4470@DB6PR0202MB2807.eurprd02.prod.outlook.com>
Hi
I am versioning my python package using git tags and the python-versioneer package.
Basically versioneer gets the version number from git tags using the command "git describe --tags --dirty --always --long --match 'tag_prefix*'". I do not apply a tag prefix, hence tag_prefix=''.
Now to the problem. My build breaks because the command above returns tags like this "refs/tags/2.12.2" which contains invalid characters. Actually, it seems that executing the command above reconfigured the way git describe behaves.
because, before running the above command "git describe --tags --dirty" returned
2.12.2-17-gd8e62f9
After, "git describe --tags --dirty" returns

warning: tag 'refs/tags/2.12.2' is really '2.12.2' here refs/tags/2.12.2-17-gd8e62f9

Is it so that "git describe --tags --dirty --always --long --match 'tag_prefix*'" changes the way git describe behave or am I missing something? If it does, how can I reset it?

Thanks Per

************************************************************************************** This e-mail and any attachments thereto may contain confidential information and/or information protected by intellectual property rights for the exclusive attention of the intended addressees named above. If you have received this transmission in error, please immediately notify the sender by return e-mail and delete this message and its attachments. Unauthorized use, copying or further full or partial distribution of this e-mail or its contents is prohibited. **************************************************************************************

Message 1 of 1 in “git describe returns tags including 'refs/tags/”
  1. Voie, Per Erlend TorbergsenOct 24, 2017

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.