Fix git revision parsing.
authorWerner Koch <wk@gnupg.org>
Fri, 19 Jul 2013 11:56:24 +0000 (13:56 +0200)
committerWerner Koch <wk@gnupg.org>
Thu, 25 Jul 2013 08:37:40 +0000 (10:37 +0200)
* configure.ac: Use git rev-parse to retrieve the revision.

Signed-off-by: Werner Koch <wk@gnupg.org>
configure.ac

index bbf6e65..0154271 100644 (file)
@@ -30,8 +30,8 @@ m4_define([my_issvn], [yes])
 
 m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \
           | sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
-m4_define([git_revision], m4_esyscmd([git branch -v 2>/dev/null \
-          | awk '/^\* / {printf "%s",$3}']))
+m4_define([git_revision],
+          m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r']))
 m4_define([my_full_version], [my_version[]m4_if(my_issvn,[yes],
           [m4_if(git_revision,[],[-svn[]svn_revision],[-git[]git_revision])])])