summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-04-21 19:34:16 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-04-21 19:34:16 (GMT)
commitc517a9defa6fae19007a398e0594074d08d18fd0 (patch)
treefd39bf6dd5a07c592bcec467900208bf67e4ab50
parent61caf972b7575314211cb0df5e1bdf1ecc61f0c0 (diff)
Ensured sources are not extracted from a clean tarball before computing the Git revision.
-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))