File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 5
5
# Copyright (C) 2009 Avery Pennarun <[email protected] >
6
6
#
7
7
8
- if test -z " $GIT_EXEC_PATH " || test " ${PATH# " ${GIT_EXEC_PATH} :" } " = " $PATH " || ! test -f " $GIT_EXEC_PATH /git-sh-setup"
8
+ if test -z " $GIT_EXEC_PATH " || ! test -f " $GIT_EXEC_PATH /git-sh-setup" || {
9
+ test " ${PATH# " ${GIT_EXEC_PATH} :" } " = " $PATH " &&
10
+ test ! " $GIT_EXEC_PATH " -ef " ${PATH%%:* } " 2> /dev/null
11
+ }
9
12
then
13
+ basename=${0##* [/\\]}
10
14
echo >&2 ' It looks like either your git installation or your'
11
15
echo >&2 ' git-subtree installation is broken.'
12
16
echo >&2
13
17
echo >&2 " Tips:"
14
18
echo >&2 " - If \` git --exec-path\` does not print the correct path to"
15
19
echo >&2 " your git install directory, then set the GIT_EXEC_PATH"
16
20
echo >&2 " environment variable to the correct directory."
17
- echo >&2 " - Make sure that your \` ${0 ##*/ } \` file is either in your"
21
+ echo >&2 " - Make sure that your \` $basename \` file is either in your"
18
22
echo >&2 " PATH or in your git exec path (\` $( git --exec-path) \` )."
19
- echo >&2 " - You should run git-subtree as \` git ${0 ##*/ git-} \` ,"
20
- echo >&2 " not as \` ${0 ##*/ } \` ." >&2
23
+ echo >&2 " - You should run git-subtree as \` git ${basename # git-} \` ,"
24
+ echo >&2 " not as \` $basename \` ." >&2
21
25
exit 126
22
26
fi
23
27
You can’t perform that action at this time.
0 commit comments