Code

http-push: add regression tests
[git.git] / git-rebase.sh
index c059749bbd5bc1e5bf4103c09b4935c46c965431..bdcea0ed703057e08fd4204245f4f0c8a308f8d0 100755 (executable)
@@ -29,6 +29,7 @@ Example:       git-rebase master~1 topic
 '
 
 SUBDIRECTORY_OK=Yes
+OPTIONS_SPEC=
 . git-sh-setup
 set_reflog_action rebase
 require_work_tree
@@ -60,7 +61,7 @@ continue_merge () {
        fi
 
        cmt=`cat "$dotest/current"`
-       if ! git diff-index --quiet HEAD
+       if ! git diff-index --quiet HEAD --
        then
                if ! git-commit -C "$cmt"
                then
@@ -178,6 +179,7 @@ do
                exit
                ;;
        --skip)
+               git reset --hard HEAD || exit $?
                if test -d "$dotest"
                then
                        git rerere clear
@@ -283,7 +285,7 @@ fi
 
 # The tree must be really really clean.
 git update-index --refresh || exit
-diff=$(git diff-index --cached --name-status -r HEAD)
+diff=$(git diff-index --cached --name-status -r HEAD --)
 case "$diff" in
 ?*)    echo "cannot rebase: your index is not up-to-date"
        echo "$diff"