git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] rebase: cleanup "--exec" option handling

From
Andrei Rybak <rybak.a.v@gmail.com>
Date
Jan 13, 2023, 20:06 UTC
Message-ID
<c17dfab8-5cc6-dbff-547d-08a3d7c289a7@gmail.com>
In-Reply-To
<pull.1461.git.1673542201452.gitgitgadget@gmail.com>
On 12/01/2023 17:50, Phillip Wood via GitGitGadget wrote:
Show 24 quoted lines
> From: Phillip Wood <phillip.wood@dunelm.org.uk>
> 
> 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>
> ---
>      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@gmail.com/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.
Previous: Phillip Wood via GitGitGadget
Message 2 of 2 in “rebase: cleanup "--exec" option handling”
  1. rebase: cleanup "--exec" option handlingPhillip Wood via GitGitGadget, Jan 12, 2023
  2. Andrei RybakJan 13, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.