improved handling of unfinished rebase, revert & cherry-pick