X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-rebase.sh;h=e2d85eeeab79e60ef46a65cfee1fb4682dd4ba68;hb=18374e584ca7a820457c1d83ee99867c216e7b75;hp=68855c18ae62ef6f4a3fdacb6f8de9c57511aa79;hpb=1af8bca79766198c591d8db58f778a98e96627e2;p=git.git diff --git a/git-rebase.sh b/git-rebase.sh index 68855c18a..e2d85eeea 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -60,7 +60,7 @@ continue_merge () { fi cmt=`cat "$dotest/current"` - if ! git diff-index --quiet HEAD -- + if ! git diff-index --quiet --ignore-submodules HEAD -- then if ! git commit --no-verify -C "$cmt" then @@ -150,7 +150,10 @@ while test $# != 0 do case "$1" in --continue) - git diff-files --quiet || { + test -d "$dotest" -o -d .dotest || + die "No rebase in progress?" + + git diff-files --quiet --ignore-submodules || { echo "You must edit all merge conflicts and then" echo "mark them as resolved using git add" exit 1 @@ -178,6 +181,9 @@ do exit ;; --skip) + test -d "$dotest" -o -d .dotest || + die "No rebase in progress?" + git reset --hard HEAD || exit $? if test -d "$dotest" then @@ -203,16 +209,16 @@ do exit ;; --abort) + test -d "$dotest" -o -d .dotest || + die "No rebase in progress?" + git rerere clear if test -d "$dotest" then move_to_original_branch - elif test -d .dotest - then + else dotest=.dotest move_to_original_branch - else - die "No rebase in progress?" fi git reset --hard $(cat "$dotest/orig-head") rm -r "$dotest" @@ -282,8 +288,8 @@ else fi # The tree must be really really clean. -git update-index --refresh || exit -diff=$(git diff-index --cached --name-status -r HEAD --) +git update-index --ignore-submodules --refresh || exit +diff=$(git diff-index --cached --name-status -r --ignore-submodules HEAD --) case "$diff" in ?*) echo "cannot rebase: your index is not up-to-date" echo "$diff"