From dc14841102bb364c2be200e8456146fc8df970b9 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Tue, 21 Jun 2005 11:14:47 -0700 Subject: [PATCH] git checkout: fix default head case The "${new=$old}" syntax only works for an undefined 'new', not for an empty one. I knew that. Really. I'm not stupid. --- git-checkout-script | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-checkout-script b/git-checkout-script index a3bfae79d..5b49662e6 100755 --- a/git-checkout-script +++ b/git-checkout-script @@ -29,7 +29,7 @@ while [ "$#" != "0" ]; do esac i=$(($i+1)) done -: ${new=$old} +[ -z "$new" ] && new=$old if [ "$force" ] then -- 2.30.2