This patch series rewrite the interactive rebase from shell to C. It is based on ffc6fa0e39 ("Fourth batch for 2.19 cycle", 2018-07-24). This apply cleanly to 1d89318c48 ("Fifth batch for 2.19 cycle"), and does not break tests. Changes since v5: - [01/20] Make write_message() public. - [04/20] Use write_message() inside of edit_todo_list(). - [08/20, 11/20 & 17/20] Return -1 instead of 1 in case of error inside of complete_action(), edit_todo_list(), append_todo_help_to_file(), and do_interactive_rebase(). - [11/20] Better error management in complete_action(). - [11/20] Use error() to show the message "Nothing to do". - [11/20] Typofix. Alban Gruin (20): sequencer: make three functions and an enum from sequencer.c public rebase -i: rewrite append_todo_help() in C editor: add a function to launch the sequence editor rebase -i: rewrite the edit-todo functionality in C sequencer: add a new function to silence a command, except if it fails rebase -i: rewrite setup_reflog_action() in C rebase -i: rewrite checkout_onto() in C sequencer: refactor append_todo_help() to write its message to a buffer sequencer: change the way skip_unnecessary_picks() returns its result t3404: todo list with commented-out commands only aborts rebase -i: rewrite complete_action() in C rebase -i: remove unused modes and functions rebase -i: implement the logic to initialize $revisions in C rebase -i: rewrite the rest of init_revisions_and_shortrevisions() in C rebase -i: rewrite write_basic_state() in C rebase -i: rewrite init_basic_state() in C rebase -i: implement the main part of interactive rebase as a builtin rebase--interactive2: rewrite the submodes of interactive rebase in C rebase -i: remove git-rebase--interactive.sh rebase -i: move rebase--helper modes to rebase--interactive .gitignore | 1 - Makefile | 5 +- builtin.h | 2 +- builtin/rebase--helper.c | 88 --------- builtin/rebase--interactive.c | 264 +++++++++++++++++++++++++++ cache.h | 1 + editor.c | 27 ++- git-rebase--interactive.sh | 283 ----------------------------- git-rebase--preserve-merges.sh | 10 +- git-rebase.sh | 47 ++++- git.c | 2 +- rebase-interactive.c | 90 ++++++++++ rebase-interactive.h | 8 + sequencer.c | 318 +++++++++++++++++++++++++++------ sequencer.h | 22 ++- strbuf.h | 2 + t/t3404-rebase-interactive.sh | 10 ++ 17 files changed, 731 insertions(+), 449 deletions(-) delete mode 100644 builtin/rebase--helper.c create mode 100644 builtin/rebase--interactive.c delete mode 100644 git-rebase--interactive.sh create mode 100644 rebase-interactive.c create mode 100644 rebase-interactive.h -- 2.18.0