diff --git a/git-subtree.sh b/git-subtree.sh index 501c6dc2f1..935dfca7f3 100755 --- a/git-subtree.sh +++ b/git-subtree.sh @@ -29,8 +29,12 @@ rejoin merge the new branch back into HEAD squash merge subtree changes as a single commit " eval $(echo "$OPTS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?) + +OPATH=$PATH PATH=$(git --exec-path):$PATH . git-sh-setup +PATH=$OPATH # apparently needed for some versions of msysgit + require_work_tree quiet=