Git development
 help / color / mirror / Atom feed
From: Andrei Rybak <rybak.a.v@gmail.com>
To: phillip.wood123@gmail.com
Cc: farid.m.zakaria@gmail.com, git@vger.kernel.org,
	gitster@pobox.com, oswald.buddenhagen@gmx.de,
	phillip.wood@dunelm.org.uk, u.kleine-koenig@baylibre.com
Subject: Re: [PATCH v2 02/10] sequencer: move definition of is_final_fixup()
Date: Wed, 15 Jul 2026 00:50:56 +0200	[thread overview]
Message-ID: <20260714225056.2285055-1-rybak.a.v@gmail.com> (raw)
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 <phillip.wood@dunelm.org.uk>
> ---
>  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

  reply	other threads:[~2026-07-14 22:51 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16 17:40 [PATCH] sequencer: Skip copying notes for commits that disappear during rebase Uwe Kleine-König
2026-06-17 13:24 ` Junio C Hamano
2026-06-17 13:58   ` Uwe Kleine-König
2026-06-19 10:13     ` Phillip Wood
2026-06-19 13:01       ` Uwe Kleine-König
2026-06-30 15:28       ` [PATCH 00/11] sequencer: do not record dropped commits as rewritten Phillip Wood
2026-06-30 15:28         ` [PATCH 01/11] t3400: restore coverage for note copying with apply backend Phillip Wood
2026-06-30 15:28         ` [PATCH 02/11] sequencer: move definition of is_final_fixup() Phillip Wood
2026-06-30 15:28         ` [PATCH 03/11] sequencer: be more careful with external merge Phillip Wood
2026-06-30 15:28         ` [PATCH 04/11] sequencer: never reschedule on failed commit Phillip Wood
2026-06-30 15:28         ` [PATCH 05/11] sequencer: remove unnecessary "or" in pick_one_commit() Phillip Wood
2026-06-30 15:28         ` [PATCH 06/11] sequencer: simplify handing of fixup with conflicts Phillip Wood
2026-06-30 15:28         ` [PATCH 07/11] sequencer: remove unnecessary condition in pick_one_commit() Phillip Wood
2026-06-30 15:28         ` [PATCH 08/11] sequencer: simplify pick_one_commit() Phillip Wood
2026-07-06 11:06           ` Oswald Buddenhagen
2026-07-06 13:40             ` Phillip Wood
2026-06-30 15:28         ` [PATCH 09/11] sequencer: return early from pick_one_commit() on success Phillip Wood
2026-07-06 11:08           ` Oswald Buddenhagen
2026-06-30 15:29         ` [PATCH 10/11] sequencer: use an enum to represent result of picking a commit Phillip Wood
2026-07-06 11:12           ` Oswald Buddenhagen
2026-07-06 13:39             ` Phillip Wood
2026-06-30 15:29         ` [PATCH 11/11] sequencer: do not record dropped commits as rewritten Phillip Wood
2026-06-30 19:57         ` [PATCH 00/11] " Junio C Hamano
2026-07-01  6:00           ` Uwe Kleine-König
2026-07-01 13:29             ` Phillip Wood
2026-07-01 13:31           ` Phillip Wood
2026-07-13  0:06             ` Junio C Hamano
2026-07-01  9:38         ` Uwe Kleine-König
2026-07-01 13:37           ` Phillip Wood
2026-07-13 13:17         ` [PATCH v2 00/10] " Phillip Wood
2026-07-13 13:17           ` [PATCH v2 01/10] t3400: restore coverage for note copying with apply backend Phillip Wood
2026-07-13 13:43             ` Oswald Buddenhagen
2026-07-13 13:17           ` [PATCH v2 02/10] sequencer: move definition of is_final_fixup() Phillip Wood
2026-07-14 22:50             ` Andrei Rybak [this message]
2026-07-13 13:17           ` [PATCH v2 03/10] sequencer: be more careful with external merge Phillip Wood
2026-07-13 14:01             ` Oswald Buddenhagen
2026-07-13 13:17           ` [PATCH v2 04/10] sequencer: never reschedule on failed commit Phillip Wood
2026-07-13 13:17           ` [PATCH v2 05/10] sequencer: remove unnecessary "or" in pick_one_commit() Phillip Wood
2026-07-13 13:17           ` [PATCH v2 06/10] sequencer: simplify handing of fixup with conflicts Phillip Wood
2026-07-13 14:09             ` Oswald Buddenhagen
2026-07-13 13:17           ` [PATCH v2 07/10] sequencer: remove unnecessary condition in pick_one_commit() Phillip Wood
2026-07-13 13:17           ` [PATCH v2 08/10] sequencer: simplify pick_one_commit() Phillip Wood
2026-07-13 13:17           ` [PATCH v2 09/10] sequencer: use an enum to represent result of picking a commit Phillip Wood
2026-07-13 13:17           ` [PATCH v2 10/10] sequencer: do not record dropped commits as rewritten Phillip Wood
2026-07-13 17:00           ` [PATCH v2 00/10] " Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260714225056.2285055-1-rybak.a.v@gmail.com \
    --to=rybak.a.v@gmail.com \
    --cc=farid.m.zakaria@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=oswald.buddenhagen@gmx.de \
    --cc=phillip.wood123@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=u.kleine-koenig@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox