Thread (1 message) 1 message, 1 author, 2026-02-19

Re: [PATCH v2 1/2] checkout: pass program-readable token to unified "main"

From: Junio C Hamano <hidden>
Date: 2026-02-19 22:21:59

Patrick Steinhardt [off-list ref] writes:
On Thu, Jan 29, 2026 at 11:06:15AM -0800, Junio C Hamano wrote:
quoted
diff --git a/builtin/checkout.c b/builtin/checkout.c
index f9453473fe..4f189fde48 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
[snip]
quoted
+	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.
Thanks.

As I locally amended the nit away while queuing, I guess I should
merge this down to 'next'.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help