From: Linus Torvalds Date: Mon, 27 Jun 2005 19:12:18 +0000 (-0700) Subject: git-checkout-script: use "--verify --revs-only" to parse revs X-Git-Tag: v0.99~160 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e2efb676ef0e70364f130c4097b7b9d67804753f;p=git.git git-checkout-script: use "--verify --revs-only" to parse revs Sven Verdoolaege points out that I added the --verify option to git-rev-parse exactly for things like this, but didn't update the users. --- diff --git a/git-checkout-script b/git-checkout-script index 4b3ae4adc..ea7fef54a 100755 --- a/git-checkout-script +++ b/git-checkout-script @@ -12,7 +12,7 @@ while [ "$#" != "0" ]; do force=1 ;; *) - rev=$(git-rev-parse "$arg") + rev=$(git-rev-parse --verify --revs-only "$arg") if [ -z "$rev" ]; then echo "unknown flag $arg" exit 1