Docs: send-email's usage text and man page mention same options
[gitweb.git] / git-rebase--interactive.sh
index 990104a52dfc2c0bacb8f7141e7399f369aa6f23..edb6ec6ed00b74764764802d0ebae56d223a2ac6 100755 (executable)
@@ -284,7 +284,7 @@ do_next () {
                pick_one $sha1 ||
                        die_with_patch $sha1 "Could not apply $sha1... $rest"
                make_patch $sha1
-               : > "$DOTEST"/amend
+               git rev-parse --verify HEAD > "$DOTEST"/amend
                warn "Stopped at $sha1... $rest"
                warn "You can amend the commit now, with"
                warn
@@ -431,6 +431,10 @@ do
                        if test -f "$DOTEST"/amend
                        then
                                amend=$(git rev-parse --verify HEAD)
+                               test "$amend" = $(cat "$DOTEST"/amend) ||
+                               die "\
+You have uncommitted changes in your working tree. Please, commit them
+first and then run 'git rebase --continue' again."
                                git reset --soft HEAD^ ||
                                die "Cannot rewind the HEAD"
                        fi