summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 18:14:47 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 18:14:47 (GMT)
commitdc14841102bb364c2be200e8456146fc8df970b9 (patch)
tree184eafb56d4b768a81db12890005fbf7e6a4a874
parente8b11749f031428f743c1e01a6934f6ff34cec16 (diff)
downloadgit-dc14841102bb364c2be200e8456146fc8df970b9.zip
git-dc14841102bb364c2be200e8456146fc8df970b9.tar.gz
git-dc14841102bb364c2be200e8456146fc8df970b9.tar.bz2
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.
-rwxr-xr-xgit-checkout-script2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-checkout-script b/git-checkout-script
index a3bfae7..5b49662 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