threads / discuss / 47016

git describe returns tags including 'refs/tags/

Subject: git describe returns tags including 'refs/tags/

## tl;dr

One message between Oct 24, 2017 and Oct 24, 2017.

replies: 0people: 1as markdown or json

Voie, Per Erlend Torbergsen· Oct 24, 2017, 08:12 UTC · lore
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. **************************************************************************************

← back to recent threads