]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Test for .git as readable instead of a dir to support worktrees
authorJ. Ryan Stinnett <jryans@gmail.com>
Mon, 5 Dec 2016 03:16:59 +0000 (21:16 -0600)
committerNick Mathewson <nickm@torproject.org>
Mon, 5 Dec 2016 13:21:17 +0000 (08:21 -0500)
Fixes #20492.

changes/20492 [new file with mode: 0644]
src/or/include.am

diff --git a/changes/20492 b/changes/20492
new file mode 100644 (file)
index 0000000..fdcd4d0
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfix (build):
+    - The current Git revision when building from a local repository is now
+      detected correctly when using git worktrees.  Fixes bug 20492; bugfix on
+      0.2.3.9-alpha.
index b4554aadb9906518d2451dc0da60b18d9046cb8c..ae493b722571d820fc55f3b71abf3522793b7022 100644 (file)
@@ -198,7 +198,7 @@ noinst_HEADERS+= $(ORHEADERS) micro-revision.i
 
 micro-revision.i: FORCE
        $(AM_V_at)rm -f micro-revision.tmp; \
-       if test -d "$(top_srcdir)/.git" && \
+       if test -r "$(top_srcdir)/.git" && \
                        test -x "`which git 2>&1;true`"; then \
                HASH="`cd "$(top_srcdir)" && git rev-parse --short=16 HEAD`"; \
                echo \"$$HASH\" > micro-revision.tmp; \