Re: [PATCH RFC v2 03/16] sequencer: introduce new history editing mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 24, 2025 at 1:42 PM Patrick Steinhardt <ps@xxxxxx> wrote:
> diff --git a/sequencer.c b/sequencer.c
> index bff181df76..898ac1a2a8 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -3052,17 +3087,29 @@ static int read_populate_todo(struct repository *r,
>                 return error(_("no commits parsed."));
>
>         if (!is_rebase_i(opts)) {
> -               enum todo_command valid =
> -                       opts->action == REPLAY_PICK ? TODO_PICK : TODO_REVERT;
> +               enum todo_command valid;
>                 int i;
>
> -               for (i = 0; i < todo_list->nr; i++)
> +               switch (opts->action) {
> +               case REPLAY_PICK:
> +               case REPLAY_HISTORY_EDIT:
> +                       valid = TODO_PICK;
> +                       break;
> +               default:
> +                       valid = TODO_REVERT;
> +                       break;
> +               }

I think I see this hunk repeated in a few places—maybe some
leftoverbits for a refactor?

-- 
D. Ben Knoble





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux