On 12/01/2023 17:50, Phillip Wood via GitGitGadget wrote:
From: Phillip Wood <phillip.wood@xxxxxxxxxxxxx>
When handling "--exec" rebase collects the commands into a struct
string_list, then prepends "exec " to each command creating a multi line
string and finally splits that string back into a list of commands. This
is an artifact of the scripted rebase and the need to support "rebase
--preserve-merges". Now that "--preserve-merges" no-longer exists we can
cleanup the way the argument is handled. There is no need to add the
"exec " prefix to the commands as that is added by todo_list_to_strbuf().
Signed-off-by: Phillip Wood <phillip.wood@xxxxxxxxxxxxx>
---
rebase: cleanup "--exec" option handling
A small cleanup following the removal of "--preserve-merges"
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1461%2Fphillipwood%2Frebase-cleanup-exec-handling-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1461/phillipwood/rebase-cleanup-exec-handling-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1461
builtin/rebase.c | 45 +++++++++++----------------------------------
sequencer.c | 4 ++--
2 files changed, 13 insertions(+), 36 deletions(-)
I can't really comment on code, but I appreciate any simplifications
around `rebase --exec`, because it will probably make it easier for
me to revive the topic about `rebase --edit-todo --exec` from the
end of 2019:
https://lore.kernel.org/git/20191114163549.7648-1-rybak.a.v@xxxxxxxxx/T/#u
It's current state (experimented a bit a week ago) is on GitHub:
https://github.com/rybak/git/tree/edit-todo-exec
Thank you.