[PATCH] Docs for git-checkout-script.
[gitweb.git] / git-checkout-script
index 7e70338c476cfcf9ad51ce5d2a1f8e7ee93d705d..b31ded716d470a4975512ebc4cb912b3adb5fb7f 100755 (executable)
@@ -22,7 +22,7 @@ while [ "$#" != "0" ]; do
                force=1
                ;;
        *)
-               rev=$(git-rev-parse --verify --revs-only "$arg^0") || exit
+               rev=$(git-rev-parse --verify "$arg^0") || exit
                if [ -z "$rev" ]; then
                        echo "unknown flag $arg"
                        exit 1
@@ -37,7 +37,6 @@ while [ "$#" != "0" ]; do
                fi
                ;;
     esac
-    i=$(($i+1))
 done
 [ -z "$new" ] && new=$old
 
@@ -72,4 +71,6 @@ if [ "$?" -eq 0 ]; then
        fi
        [ "$branch" ] && ln -sf "refs/heads/$branch" "$GIT_DIR/HEAD"
        rm -f "$GIT_DIR/MERGE_HEAD"
+else
+       exit 1
 fi