[PATCH] git-cvsimport-script: add "import only" option
[git.git] / git-checkout-script
index 4b3ae4a..bf52e3b 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/sh
-: ${GIT_DIR=.git}
+. git-sh-setup-script || die "Not a git archive"
+
 old=$(git-rev-parse HEAD)
 new=
 force=
@@ -12,7 +13,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