diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2023-01-12 19:50:01 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-01-13 23:23:14 +0300 |
commit | e57d2c59377943fed09ec30012634f60788bdfca (patch) | |
tree | a8fad17600eafeea0c553dc87bb7345cd434290c /sequencer.c | |
parent | a38d39a4c50d1275833aba54c4dbdfce9e2e9ca1 (diff) |
rebase: cleanup "--exec" option handling
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@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
-rw-r--r-- | sequencer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sequencer.c b/sequencer.c index bcb662e23b..3e4a197289 100644 --- a/sequencer.c +++ b/sequencer.c @@ -5745,8 +5745,8 @@ static void todo_list_add_exec_commands(struct todo_list *todo_list, base_items[i].command = TODO_EXEC; base_items[i].offset_in_buf = base_offset; - base_items[i].arg_offset = base_offset + strlen("exec "); - base_items[i].arg_len = command_len - strlen("exec "); + base_items[i].arg_offset = base_offset; + base_items[i].arg_len = command_len; base_offset += command_len + 1; } |