rebase -i: do not leave a CHERRY_PICK_HEAD file behind
[gitweb.git] / git-rebase--interactive.sh
index b64dd28acf86e0b3075a638ae3419fb3a79a1815..3b361229b75317359c90f854cf19e3853349e382 100644 (file)
@@ -836,7 +836,11 @@ continue)
        # do we have anything to commit?
        if git diff-index --cached --quiet HEAD --
        then
-               : Nothing to commit -- skip this
+               # Nothing to commit -- skip this commit
+
+               test ! -f "$GIT_DIR"/CHERRY_PICK_HEAD ||
+               rm "$GIT_DIR"/CHERRY_PICK_HEAD ||
+               die "Could not remove CHERRY_PICK_HEAD"
        else
                if ! test -f "$author_script"
                then