Browse Source

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.
maint
Linus Torvalds 20 years ago
parent
commit
dc14841102
  1. 2
      git-checkout-script

2
git-checkout-script

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

if [ "$force" ]
then

Loading…
Cancel
Save