Browse Source

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>
maint
Junio C Hamano 18 years ago
parent
commit
41f5d73391
  1. 2
      git-checkout.sh

2
git-checkout.sh

@ -196,7 +196,7 @@ else @@ -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

Loading…
Cancel
Save