From: Phillip Wood Date: Mon, 13 Jul 2026 13:17:19 GMT Subject: [PATCH v2 02/10] sequencer: move definition of is_final_fixup() Message-ID: <02670f57e7d81d4ff7341fecff3ef04b9fdc0102.1783948637.git.phillip.wood@dunelm.org.uk> In-Reply-To: From: Phillip Wood 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, 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