git-checkout-script: use "--verify --revs-only" to parse revs
authorLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 27 Jun 2005 19:12:18 +0000 (12:12 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 27 Jun 2005 19:12:18 +0000 (12:12 -0700)
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.

git-checkout-script

index 4b3ae4a..ea7fef5 100755 (executable)
@@ -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