Skip to content

Commit

Permalink
git-checkout: fix "eval" used for merge labelling.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Mar 14, 2007
1 parent ad0f8c9 commit 41f5d73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 41f5d73

Please sign in to comment.