Re: Retrieving last tag of a working tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



the_jack wrote:
> Precompiler assigns this string to a variable. At this moment, version.h is
> filled by python script that calls "git-describe --tag HEAD" and parses the
> output. This works, but it's not quite reliable. There has to be a better
> way for getting the last tag of current working tree. If I checkout an
> earlier tagged version (0.70), I would need to automatically get 0.70 inside
> version.h

'git describe' is indeed the tool for this.  You have not said in what
way it fails, so here's an educated guess:

Up until 7e425c4 (describe: Make --tags and --all match lightweight
tags more often, 2008-10-13) which will only be in 1.6.1, using --tags
does not match a lightweight tag if there is also an annotated tag
available.

-Thomas

-- 
Thomas Rast
trast@{inf,student}.ethz.ch




Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux