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>
This commit is contained in:
Junio C Hamano 2007-03-14 09:48:13 -07:00
parent ad0f8c9ea7
commit 41f5d73391

View file

@ -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