aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libsigrokdecode/version.patch
blob: 7472542b4a316058c3b3065cee22270ebc9db4ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/m4/sigrok.m4 b/m4/sigrok.m4
index 2ca2444..924b9df 100644
--- a/m4/sigrok.m4
+++ b/m4/sigrok.m4
@@ -54,7 +54,7 @@ m4_assert([$# >= 6])[]dnl
 $1=$4
 sr_git_deps=
 # Check if we can get revision information from git.
-sr_head=`git -C "$srcdir" rev-parse --verify --short HEAD 2>&AS_MESSAGE_LOG_FD`
+sr_head=`test -d "$srcdir"/.git && git -C "$srcdir" rev-parse --verify --short HEAD 2>&AS_MESSAGE_LOG_FD`
 
 AS_IF([test "$?" = 0 && test "x$sr_head" != x], [dnl
 	test ! -f "$srcdir/.git/HEAD" \