rebase--interactive2: rewrite the submodes of interactive rebase in C