X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/6d0703a01df1ece3fd9ba2a927913d1bcf10d549..1048151cc4bec79f7310f4f2ede309889822a6bb:/autogen.sh diff --git a/autogen.sh b/autogen.sh index 3809942acf..b1bd86b461 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.