rebase -i: rewrite the edit-todo functionality in C