Git development
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>,
	Phillip Wood <phillip.wood@dunelm.org.uk>
Cc: git@vger.kernel.org,
	"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
	"Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH 10/11] sequencer: use an enum to represent result of picking a commit
Date: Mon, 6 Jul 2026 14:39:23 +0100	[thread overview]
Message-ID: <9771702d-49c4-496a-a77f-22c244acc443@gmail.com> (raw)
In-Reply-To: <akuNmMFST8W2H2Ru@ugly.lan>

On 06/07/2026 12:12, Oswald Buddenhagen wrote:
> On Tue, Jun 30, 2026 at 04:29:00PM +0100, Phillip Wood wrote:
>> Rather than using an integer where -1 is an error, 0 is success and
>> 1 means there were conflicts use an enum. This is clearer and lets
>> us add a separate return value for commits that are dropped because
>> they become empty in the next commit.
>>
> have you attempted widening the scope of the enum? the three conversions 
> between the new enum and existing int return values irk me.

I know what you mean, but how wide should be go? Using the enum just one 
level up the call chain means converting a whole load of functions which 
creates a lot of churn that someone needs to review. I decided to keep 
the enum limited to this scope for now to avoid that.

Thanks

Phillip


  reply	other threads:[~2026-07-06 13:39 UTC|newest]

Thread overview: 28+ 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 [this message]
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-01  9:38         ` Uwe Kleine-König
2026-07-01 13:37           ` Phillip Wood

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=9771702d-49c4-496a-a77f-22c244acc443@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=oswald.buddenhagen@gmx.de \
    --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