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>
This commit is contained in:

committed by
Junio C Hamano

parent
a38d39a4c5
commit
e57d2c5937
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user