Re: [new tool] git-project-version.sh

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

 



On Tue, Apr 15, 2008 at 1:36 PM, Nico -telmich- Schottelius
<nico-git-20080415@xxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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