[Mesa-dev] [PATCH] automake: avoid fetching unnecessary data for the generation of git_sha1.h

Tobias Klausmann tobias.johannes.klausmann at mni.thm.de
Tue May 31 22:18:57 UTC 2016


Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
---
 src/Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index f5c0773..d0990dc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,8 +22,8 @@
 git_sha1.h:
 	@if test -e $(top_srcdir)/.git; then \
 		if which git > /dev/null; then \
-		    git --git-dir=$(top_srcdir)/.git log -n 1 --oneline | \
-			sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \
+		    git --git-dir=$(top_srcdir)/.git rev-parse --short HEAD | \
+			sed 's/^\(.*\)/#define MESA_GIT_SHA1 "git-\1"/' \
 			> git_sha1.h ; \
 		fi \
 	fi
-- 
2.8.3



More information about the mesa-dev mailing list