Skip to content

Commit 1bf10e4

Browse files
committed
Fixed typo, better detection for git-subtree
Test path for git-subtree is probably the correct way to see if subtree is installed. Fixed typo for PUSH_CM -> PUSH_CMD.
1 parent f8dcc66 commit 1bf10e4

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

git-subsplit.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,11 @@ eval "$(echo "$OPTS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?)"
3131
# We can run this from anywhere.
3232
NONGIT_OK=1
3333

34-
GIT_EXEC_PATH=$(git --exec-path)
35-
36-
PATH=$PATH:$GIT_EXEC_PATH
34+
PATH=$PATH:$(git --exec-path)
3735

3836
. git-sh-setup
3937

40-
if [ ! -e "${GIT_EXEC_PATH}/git-subtree" ]
38+
if [ "$(hash git-subtree &>/dev/null && echo OK)" = "" ]
4139
then
4240
die "Git subplit needs git subtree; install git subtree or upgrade git to >=1.7.11"
4341
fi
@@ -197,7 +195,7 @@ subsplit_publish()
197195
echo \# $PUSH_CMD
198196
$PUSH_CMD
199197
else
200-
$PUSH_CM
198+
$PUSH_CMD
201199
fi
202200
fi
203201
done

0 commit comments

Comments
 (0)