summaryrefslogtreecommitdiff
path: root/git-checkout.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-03-14 16:48:13 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-03-14 16:48:13 (GMT)
commit41f5d73391e3fe5c4cb2829582b26a85930964d1 (patch)
tree858abc2b10fc46cb6801571e9d140b938e892a8c /git-checkout.sh
parentad0f8c9ea76dcce82eb3fa1b308e495c21b834d1 (diff)
downloadgit-41f5d73391e3fe5c4cb2829582b26a85930964d1.zip
git-41f5d73391e3fe5c4cb2829582b26a85930964d1.tar.gz
git-41f5d73391e3fe5c4cb2829582b26a85930964d1.tar.bz2
git-checkout: fix "eval" used for merge labelling.
The symbolic notation of the fork point can contain whitespaces (e.g. "git checkout -m 'HEAD@{9 hours ago}'"). Quote strings properly when using eval to prepare GITHEAD_$new Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-checkout.sh')
-rwxr-xr-xgit-checkout.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-checkout.sh b/git-checkout.sh
index 14835a4..83b2639 100755
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -196,7 +196,7 @@ else
work=`git write-tree` &&
git read-tree --reset -u $new || exit
- eval GITHEAD_$new=${new_name:-${branch:-$new}} &&
+ eval GITHEAD_$new='${new_name:-${branch:-$new}}' &&
eval GITHEAD_$work=local &&
export GITHEAD_$new GITHEAD_$work &&
git merge-recursive $old -- $new $work