[PATCH] git-ssh-pull: commit-id consistency
[git.git] / git-checkout-script
index 870b1a3..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
@@ -22,7 +22,7 @@ while [ "$#" != "0" ]; do
                        exit 1
                fi
                new="$rev"
-               if [ -f "$GIT_DIR/revs/heads/$arg" ]; then
+               if [ -f "$GIT_DIR/refs/heads/$arg" ]; then
                        branch="$arg"
                fi
                ;;