From: "Santi Béjar" <sbejar@gmail.com>
To: "Nico -telmich- Schottelius" <nico-git-20080415@schottelius.org>
Cc: git@vger.kernel.org
Subject: Re: [new tool] git-project-version.sh
Date: Tue, 15 Apr 2008 14:01:06 +0200 [thread overview]
Message-ID: <8aa486160804150501p2f55a3e9g33df94c1d4274e48@mail.gmail.com> (raw)
In-Reply-To: <20080415113629.GA17459@denkbrett.schottelius.org>
On Tue, Apr 15, 2008 at 1:36 PM, Nico -telmich- Schottelius
<nico-git-20080415@schottelius.org> wrote:
> Hello!
>
> As I want to use the latest commit id in all my projects, so I know
> which commit the version is based on, I wrote an extremly simple script
> that is based on git-show to display only the version named
> git-project-version.sh.
an equivalent simpler version is:
git rev-parse [--short] HEAD
Also "git show" is a porcelain command, that means it is for humans,
not for scripts. The output of "git show" can change while the output
of "git rev-parse" (and the plumbing) is stable.
But maybe what you really want is:
git describe [--always]
Santi
next prev parent reply other threads:[~2008-04-15 12:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-15 11:36 [new tool] git-project-version.sh Nico -telmich- Schottelius
2008-04-15 11:55 ` Björn Steinbrink
2008-04-15 12:02 ` Nico -telmich- Schottelius
2008-04-15 12:01 ` Santi Béjar [this message]
2008-04-15 12:52 ` Nico Schottelius
2008-04-15 12:55 ` Elijah Newren
2008-04-15 13:09 ` Nico Schottelius
2008-04-15 12:05 ` Luciano Rocha
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=8aa486160804150501p2f55a3e9g33df94c1d4274e48@mail.gmail.com \
--to=sbejar@gmail.com \
--cc=git@vger.kernel.org \
--cc=nico-git-20080415@schottelius.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).