rebase: extract functions out of git_rebase__interactive