Skip to content

Commit

Permalink
Port autogen.sh to Git 2.4
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eggert committed May 14, 2016
1 parent c8109d9 commit 9110982
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions autogen.sh
Expand Up @@ -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.
Expand Down

0 comments on commit 9110982

Please sign in to comment.