From: Andrei Rybak Date: Tue, 14 Jul 2026 22:50:56 GMT Subject: Re: [PATCH v2 02/10] sequencer: move definition of is_final_fixup() Message-ID: <20260714225056.2285055-1-rybak.a.v@gmail.com> In-Reply-To: <02670f57e7d81d4ff7341fecff3ef04b9fdc0102.1783948637.git.phillip.wood@dunelm.org.uk> > Move this function earlier in the file in preparation for adding a > new caller in a later commit. > > Signed-off-by: Phillip Wood > --- > sequencer.c | 30 +++++++++++++++--------------- > 1 file changed, 15 insertions(+), 15 deletions(-) > > diff --git a/sequencer.c b/sequencer.c > index 57855b0066a..32a09b6e87d 100644 > --- a/sequencer.c > +++ b/sequencer.c > @@ -4627,21 +4627,6 @@ static int do_update_refs(struct repository *r, int quiet) > strbuf_release(&update_msg); > strbuf_release(&error_msg); > return res; > -} > - > -static int is_final_fixup(struct todo_list *todo_list) > -{ > - int i = todo_list->current; > - > - if (!is_fixup(todo_list->items[i].command)) > - return 0; > - > - while (++i < todo_list->nr) > - if (is_fixup(todo_list->items[i].command)) > - return 0; > - else if (!is_noop(todo_list->items[i].command)) > - break; > - return 1; > } > > static enum todo_command peek_command(struct todo_list *todo_list, int offset) > @@ -4925,6 +4910,21 @@ static int reread_todo_if_changed(struct repository *r, 4910 is greater than 4627, the function is_final_fixup() seems to have been moved _later_ in the file. But the commit message says "Move this function earlier in the file". Am I missing something? > strbuf_release(&buf); > > return 0; > +} > + > +static int is_final_fixup(struct todo_list *todo_list) > +{ > + int i = todo_list->current; > + > + if (!is_fixup(todo_list->items[i].command)) > + return 0; > + > + while (++i < todo_list->nr) > + if (is_fixup(todo_list->items[i].command)) > + return 0; > + else if (!is_noop(todo_list->items[i].command)) > + break; > + return 1; > } > > static const char rescheduled_advice[] = > -- > 2.54.0.200.gfd8d68259e3