summaryrefslogtreecommitdiff
path: root/git-subtree.sh
diff options
context:
space:
mode:
authorLibravatar Avery Pennarun <apenwarr@gmail.com>2010-06-24 01:53:05 -0400
committerLibravatar Avery Pennarun <apenwarr@gmail.com>2010-06-24 01:53:05 -0400
commit9c632ea29ccd58a9967690c2670edec31dc468cd (patch)
treec6b75245e4c216b2c427fbd60a3e5a1e54253f10 /git-subtree.sh
parentAdded new 'push' command and 2-parameter form of 'add'. (diff)
downloadtgif-9c632ea29ccd58a9967690c2670edec31dc468cd.tar.xz
(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.
Diffstat (limited to 'git-subtree.sh')
-rwxr-xr-xgit-subtree.sh4
1 files changed, 4 insertions, 0 deletions
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=