summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--gitrev.m42
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6dd49d4..becc1e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+16-04-21 Cyrille Bagard <nocbos@gmail.com>
+
+ * gitrev.m4:
+ Ensure sources are not extracted from a clean tarball before computing
+ the Git revision.
+
16-04-20 Cyrille Bagard <nocbos@gmail.com>
* plugins/libcsem/exit.c:
diff --git a/gitrev.m4 b/gitrev.m4
index e7e389c..bf2057b 100644
--- a/gitrev.m4
+++ b/gitrev.m4
@@ -1,4 +1,4 @@
-define([gitrepo], esyscmd([bash -c "echo -n $(( $(git rev-list HEAD | wc -l) + 4))"]))
+define([gitrepo], esyscmd([bash -c "echo -n $(( $(test -d .git && git rev-list HEAD | wc -l) + 4))"]))
define([gitversion], ifelse(gitrepo, , 000, gitrepo))