This patch series rewrites some parts of interactive rebase from shell to C: - append_todo_help(). The C version covers a bit more than the shell version. - The edit-todo functionnality. - The reflog operations. - complete_action(). - init_revisions_and_shortrevisions(). This patch series is based on master (as of 2018-07-10). Changes since v2: - Lowercasing error messages. - Removing a comment from run_command_silent_on_success(). - Using the `else` keyword to call run_command_silent_on_success() or run_command() in run_git_commit() and run_git_checkout(). - Dropping the `verbose` parameter in run_git_checkout(), prepare_branch_to_be_rebased(), and checkout_onto(), as the replay_opts structure already has a `verbose` field. - Rewriting complete_action() and init_revisions_and_shortrevisions(). Alban Gruin (13): sequencer: make two functions and an enum from sequencer.c public rebase--interactive: rewrite append_todo_help() in C editor: add a function to launch the sequence editor rebase-interactive: 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 rebase--interactive: rewrite complete_action() in C rebase--interactive: remove unused modes and functions rebase -i: implement the logic to initialize the variable $revision in C rebase -i: rewrite the rest of init_revisions_and_shortrevisions in C Makefile | 1 + builtin/rebase--helper.c | 123 +++++++++++++++++---- cache.h | 1 + editor.c | 27 ++++- git-rebase--interactive.sh | 216 ++----------------------------------- git-rebase.sh | 2 +- rebase-interactive.c | 96 +++++++++++++++++ rebase-interactive.h | 11 ++ sequencer.c | 215 +++++++++++++++++++++++++++++------- sequencer.h | 15 ++- strbuf.h | 2 + 11 files changed, 439 insertions(+), 270 deletions(-) create mode 100644 rebase-interactive.c create mode 100644 rebase-interactive.h -- 2.18.0