From: Junio C Hamano Date: Wed, 14 Mar 2007 16:48:13 +0000 (-0700) Subject: git-checkout: fix "eval" used for merge labelling. X-Git-Tag: v1.5.0.4~2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=41f5d73391e3fe5c4cb2829582b26a85930964d1;p=git.git 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 --- diff --git a/git-checkout.sh b/git-checkout.sh index 14835a4aa..83b2639d6 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