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.
This commit is contained in:
Linus Torvalds 2005-06-21 11:14:47 -07:00
parent e8b11749f0
commit dc14841102

View File

@ -29,7 +29,7 @@ while [ "$#" != "0" ]; do
esac
i=$(($i+1))
done
: ${new=$old}
[ -z "$new" ] && new=$old
if [ "$force" ]
then