summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/subtree/git-subtree.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index b06782bc79..3935cea7dd 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -5,7 +5,10 @@
# Copyright (C) 2009 Avery Pennarun <apenwarr@gmail.com>
#
-if test -z "$GIT_EXEC_PATH" || test "${PATH#"${GIT_EXEC_PATH}:"}" = "$PATH" || ! test -f "$GIT_EXEC_PATH/git-sh-setup"
+if test -z "$GIT_EXEC_PATH" || ! test -f "$GIT_EXEC_PATH/git-sh-setup" || {
+ test "${PATH#"${GIT_EXEC_PATH}:"}" = "$PATH" &&
+ test ! "$GIT_EXEC_PATH" -ef "${PATH%%:*}" 2>/dev/null
+}
then
echo >&2 'It looks like either your git installation or your'
echo >&2 'git-subtree installation is broken.'