path: root/
AgeCommit message (Collapse)Author
2019-05-15rebase: fold git-rebase--common into the -p backendJohannes Schindelin
The only remaining scripted part of `git rebase` is the `--preserve-merges` backend. Meaning: there is little reason to keep the "library of common rebase functions" as a separate file. While moving the functions to ``, we also drop the `move_to_original_branch` function that is no longer used. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2018-11-02Merge branch 'ag/rebase-i-in-c'Junio C Hamano
Rewrite of the remaining "rebase -i" machinery in C. * ag/rebase-i-in-c: rebase -i: move rebase--helper modes to rebase--interactive rebase -i: remove rebase--interactive2: rewrite the submodes of interactive rebase in C rebase -i: implement the main part of interactive rebase as a builtin rebase -i: rewrite init_basic_state() in C rebase -i: rewrite write_basic_state() in C rebase -i: rewrite the rest of init_revisions_and_shortrevisions() in C rebase -i: implement the logic to initialize $revisions in C rebase -i: remove unused modes and functions rebase -i: rewrite complete_action() in C t3404: todo list with commented-out commands only aborts sequencer: change the way skip_unnecessary_picks() returns its result sequencer: refactor append_todo_help() to write its message to a buffer rebase -i: rewrite checkout_onto() in C rebase -i: rewrite setup_reflog_action() in C sequencer: add a new function to silence a command, except if it fails rebase -i: rewrite the edit-todo functionality in C editor: add a function to launch the sequence editor rebase -i: rewrite append_todo_help() in C sequencer: make three functions and an enum from sequencer.c public
2018-10-09rebase -i: move rebase--helper modes to rebase--interactiveAlban Gruin
This moves the rebase--helper modes still used by (`--shorten-ids`, `--expand-ids`, `--check-todo-list`, `--rearrange-squash` and `--add-exec-commands`) to rebase--interactive.c. is modified accordingly, and rebase--helper.c is removed as it is useless now. Signed-off-by: Alban Gruin <> Signed-off-by: Junio C Hamano <>
2018-07-06git-rebase--preserve-merges: fix formatting of todo help messageTobias Klauser
Part of the todo help message in is unnecessarily indented, making the message look weird. Remove the extra lines and trailing indent. This was a minor regression introduced by d48f97aa ("rebase: reindent function git_rebase__interactive", 2018-03-23) in the 2.18 timeframe. The same issue exists in "rebase -i", but it is being addressed separately as part of the rewrite of the subcommand into C. Signed-off-by: Tobias Klauser <> Reviewed-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2018-06-01rebase: strip unused code in git-rebase--preserve-merges.shAlban Gruin
This removes the code coming from that is not needed by preserve-merges, and changes the header comment accordingly. In a following commit, the -p code from will be stripped out. As preserve-merges’ successor is already in the works, this will be the only script to be converted. This also seems to fix a bug where a failure in `pick_one_preserving_merges()` would fallback to the non-preserve-merges `pick_one()`. Signed-off-by: Alban Gruin <>
2018-06-01rebase: introduce a dedicated backend for --preserve-mergesAlban Gruin
This duplicates to This is done to split -p from -i. No modifications are made to this file here, but any code that is not used by -p will be stripped in the next commit. Signed-off-by: Alban Gruin <>