[ipxe-devel] show git version

Christian Hesse list at eworm.de
Fri Jul 6 16:41:11 UTC 2012


Robin Smidsrød <robin at smidsrod.no> on Fri, 06 Jul 2012 17:16:04 +0200:
> On 05.07.2012 11:20, Christian Hesse wrote:
> > This brings a new idea to my mind - could be useful to have the git
> > version printed when booting.
> 
> I'd prefer to use the abbreviated/short SHA1 (7 digits) that is used
> elsewhere in git to identify the checkout. You can easily get the SHA1
> associated with HEAD like this:
> 
> git rev-parse --short HEAD
> 
> I think that should give more accurate info than 'git describe
> --tags'.

$ git describe --tags
v1.0.0-1013-gf3d197a
$ git rev-parse --short HEAD
f3d197a

The abbreviated/short SHA1 is included in describe output... Using
describe has the advantage that it also includes a commit count, so you
can easily see what revision is more recent.
-- 
Schoene Gruesse
Chris
                         O< ascii ribbon campaign
                   stop html mail - www.asciiribbon.org



More information about the ipxe-devel mailing list