public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Simon Cheng <cyqsimon@gmail.com>,
	Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Subject: Re: [PATCH v2 1/2] checkout: pass program-readable token to unified "main"
Date: Fri, 6 Feb 2026 17:05:15 +0100	[thread overview]
Message-ID: <aYYROwDxrHU-H3n_@pks.im> (raw)
In-Reply-To: <20260129190616.645471-2-gitster@pobox.com>

On Thu, Jan 29, 2026 at 11:06:15AM -0800, Junio C Hamano wrote:
> diff --git a/builtin/checkout.c b/builtin/checkout.c
> index f9453473fe..4f189fde48 100644
> --- a/builtin/checkout.c
> +++ b/builtin/checkout.c
[snip]
> +	switch (which_command) {
> +	case CHECKOUT_CHECKOUT:
> +		usagestr = checkout_usage;
> +		break;
> +	case CHECKOUT_SWITCH:
> +		usagestr = switch_branch_usage;
> +		break;
> +	case CHECKOUT_RESTORE:
> +		usagestr = restore_usage;
> +		break;
> +	default:
> +		BUG("No such checkout variant %d", which_command);
> +	}

Tiniest nit, really not worth addressing on its own: BUG messages
typically start with a lower-case letter.

Other than that I like that we have less global constants with this
change.

Patrick

  reply	other threads:[~2026-02-06 16:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-27 19:29 [PATCH 0/2] Improving advise messages from "switch" Junio C Hamano
2026-01-27 19:29 ` [PATCH 1/2] checkout: pass program-readable token to unified "main" Junio C Hamano
2026-01-27 19:29 ` [PATCH 2/2] checkout: tell "parse_remote_branch" which command is calling it Junio C Hamano
2026-01-27 20:35   ` Kristoffer Haugsbakk
2026-01-27 21:22     ` Junio C Hamano
2026-01-29 19:06 ` [PATCH v2 0/2] Improving advise messages from "switch" Junio C Hamano
2026-01-29 19:06   ` [PATCH v2 1/2] checkout: pass program-readable token to unified "main" Junio C Hamano
2026-02-06 16:05     ` Patrick Steinhardt [this message]
2026-02-19 22:21       ` Junio C Hamano
2026-01-29 19:06   ` [PATCH v2 2/2] checkout: tell "parse_remote_branch" which command is calling it Junio C Hamano
2026-02-06 16:05     ` Patrick Steinhardt

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=aYYROwDxrHU-H3n_@pks.im \
    --to=ps@pks.im \
    --cc=cyqsimon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=kristofferhaugsbakk@fastmail.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