summaryrefslogtreecommitdiff
path: root/git-checkout.sh
diff options
context:
space:
mode:
authorLibravatar Peter Anvin <hpa@tazenda.sc.orionmulti.com>2005-10-03 12:04:44 -0700
committerLibravatar Peter Anvin <hpa@tazenda.sc.orionmulti.com>2005-10-03 12:04:44 -0700
commit79a9d8ea0d88a3667ad19be8e705405ab5d896f1 (patch)
tree15d04fe258e969f2a43aaff3c292286984d0147c /git-checkout.sh
parentBetter handling of exec extension in the git wrapper script (diff)
parentPost 0.99.8 master branch (diff)
downloadtgif-79a9d8ea0d88a3667ad19be8e705405ab5d896f1.tar.xz
Merge with master.kernel.org:/pub/scm/git/git.git
Diffstat (limited to 'git-checkout.sh')
-rwxr-xr-xgit-checkout.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-checkout.sh b/git-checkout.sh
index 37afcdda30..c3825904b6 100755
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -71,7 +71,8 @@ if [ "$?" -eq 0 ]; then
echo $new > "$GIT_DIR/refs/heads/$newbranch"
branch="$newbranch"
fi
- [ "$branch" ] && ln -sf "refs/heads/$branch" "$GIT_DIR/HEAD"
+ [ "$branch" ] &&
+ GIT_DIR="$GIT_DIR" git-symbolic-ref HEAD "refs/heads/$branch"
rm -f "$GIT_DIR/MERGE_HEAD"
else
exit 1