(Hopefully) fix PATH setting for msysgit.
Reported by Evan Shaw. The problem is that $(git --exec-path) includes a 'git' binary which is incompatible with the one in /usr/bin; if you run it, it gives you an error about libiconv2.dll. You might think we could just add $(git --exec-path) at the *end* of PATH, but then if there are multiple versions of git installed, we could end up with the wrong one; earlier versions used to put git-sh-setup in /usr/bin, so we'd pick up that one before the new one. So now we just set PATH back to its original value right after running git-sh-setup, and we should be okay.
Avery Pennarun committed
Jun 24, 2010 at 01:53 UTC
9c632ea29ccd58a9967690c2670edec31dc468cd
1 file changed
+4
git-subtree.sh
+4
@@ -29,8 +29,12 @@ rejoin merge the new branch back into HEAD
29
squash merge subtree changes as a single commit
30
"
31
eval $(echo "$OPTS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?)
32
+
33
+OPATH=$PATH
34
PATH=$(git --exec-path):$PATH
35
. git-sh-setup
36
+PATH=$OPATH # apparently needed for some versions of msysgit
37
+
38
require_work_tree
39
40
quiet=