summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-05-14 10:24:22 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-05-14 10:24:41 -0700
commit91109821a2a190206d43db50605986e614b916f2 (patch)
treea7ab516791d4720a36f3817e28e495d890affc91 /autogen.sh
parentc8109d9c4057d8cac79e2c139758cadd410e7446 (diff)
downloademacs-91109821a2a190206d43db50605986e614b916f2.tar.gz
Port autogen.sh to Git 2.4
Problem reported by Michael Brand in: http://lists.gnu.org/archive/html/emacs-devel/2016-05/msg00367.html * autogen.sh (git_config): Don't assume that git rev-parse groks --git-common-dir.
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/autogen.sh b/autogen.sh
index 3809942acf4..b1bd86b4614 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -277,8 +277,10 @@ git_config ()
# Get location of Git's common configuration directory. For older Git
# versions this is just '.git'. Newer Git versions support worktrees.
-test -e .git && git_common_dir=`git rev-parse --git-common-dir 2>/dev/null` ||
- git_common_dir=.git
+{ test -e .git &&
+ git_common_dir=`git rev-parse --no-flags --git-common-dir 2>/dev/null` &&
+ test -n "$git_common_dir"
+} || git_common_dir=.git
hooks=$git_common_dir/hooks
# Check hashes when transferring objects among repositories.