summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ. Ryan Stinnett <jryans@gmail.com>2016-12-04 21:16:59 -0600
committerNick Mathewson <nickm@torproject.org>2016-12-05 08:21:17 -0500
commitcf2f36b8b422aa4cf11282bc14421b6dbfa54beb (patch)
tree2c0e11d9a840279cb10215aeeff2db2e28eec688
parent42ec60ecfbff39c454945bc52def0df196ec38b8 (diff)
downloadtor-cf2f36b8b422aa4cf11282bc14421b6dbfa54beb.tar.gz
tor-cf2f36b8b422aa4cf11282bc14421b6dbfa54beb.zip
Test for .git as readable instead of a dir to support worktrees
Fixes #20492.
-rw-r--r--changes/204924
-rw-r--r--src/or/include.am2
2 files changed, 5 insertions, 1 deletions
diff --git a/changes/20492 b/changes/20492
new file mode 100644
index 0000000000..fdcd4d0b4b
--- /dev/null
+++ b/changes/20492
@@ -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.
diff --git a/src/or/include.am b/src/or/include.am
index b4554aadb9..ae493b7225 100644
--- a/src/or/include.am
+++ b/src/or/include.am
@@ -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; \