git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: chen chang <chenchangs@gmail.com>, git@vger.kernel.org
Subject: Re: Is it possible get the tag name of working copy in Git?
Date: Fri, 13 Mar 2015 10:36:06 +0100	[thread overview]
Message-ID: <5502AF86.9050803@web.de> (raw)
In-Reply-To: <CAFL7HFUNMrTfLx+kj6rBiNeuLhbkPF_t32kOYYSxBP9F=eKSxQ@mail.gmail.com>

On 03/13/2015 08:08 AM, chen chang wrote:
> I want to use make file auto generate the revision number of working
> copy from the tag name in git.
You should have the tag name, as it is set up before running make,
and probably feed into both "git checkout tagXXYYXX" and the Makefile.

If you want the "version number", what is this ?
Git has a sha value, you can git it like this:

git rev-parse HEAD  | cut -b 1-9

HTH

  reply	other threads:[~2015-03-13  9:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-13  7:08 Is it possible get the tag name of working copy in Git? chen chang
2015-03-13  9:36 ` Torsten Bögershausen [this message]
2015-03-13 17:00   ` Stefan Beller

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=5502AF86.9050803@web.de \
    --to=tboegi@web.de \
    --cc=chenchangs@gmail.com \
    --cc=git@vger.kernel.org \
    /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).