git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: "the_jack" <josip@yopmail.com>
Cc: git@vger.kernel.org
Subject: Re: Retrieving last tag of a working tree
Date: Sun, 21 Dec 2008 16:28:56 +0100	[thread overview]
Message-ID: <200812211628.59120.trast@student.ethz.ch> (raw)
In-Reply-To: <21071491.post@talk.nabble.com>

[-- Attachment #1: Type: text/plain, Size: 828 bytes --]

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 #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

      parent reply	other threads:[~2008-12-21 15:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-18 12:07 Retrieving last tag of a working tree the_jack
2008-12-21 14:53 ` Sitaram Chamarty
2008-12-21 15:28 ` Thomas Rast [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200812211628.59120.trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=git@vger.kernel.org \
    --cc=josip@yopmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).