diff --git a/git-checkout-script b/git-checkout-script index bf52e3bb24..48e1da9399 100755 --- a/git-checkout-script +++ b/git-checkout-script @@ -13,7 +13,7 @@ while [ "$#" != "0" ]; do force=1 ;; *) - rev=$(git-rev-parse --verify --revs-only "$arg") + rev=$(git-rev-parse --verify --revs-only "$arg^0") || exit if [ -z "$rev" ]; then echo "unknown flag $arg" exit 1