From: Jeff King Date: Fri, 22 May 2026 04:43:52 GMT Subject: Re: [PATCH] connect: use "service" enum for "name" argument Message-ID: <20260522044352.GA861761@coredump.intra.peff.net> In-Reply-To: On Thu, May 21, 2026 at 10:19:48AM +0200, Patrick Steinhardt wrote: > > + switch (service) { > > + case GIT_CONNECT_UPLOAD_PACK: > > + return "git-upload-pack"; > > + case GIT_CONNECT_RECEIVE_PACK: > > + return "git-receive-pack"; > > + case GIT_CONNECT_UPLOAD_ARCHIVE: > > + return "git-upload-archive"; > > + } > > + BUG("unknown git_connect_type: %d", service); > > +} > > Shouldn't this say "unknown git_connect_service" instead of "_type"? Oops, yes. As you probably guessed, I started with "type" before realizing that "service" was a better word. The patch is in next, so the fixup on top (of jk/connect-service-enum) is below. -- >8 -- Subject: [PATCH] transport-helper: fix typo in BUG() message We mistakenly refer to the git_connect_service enum as "_type" rather than "_service". Users should never see this message in practice, but it is slightly confusing when reading the code. Reported-by: Patrick Steinhardt Signed-off-by: Jeff King --- transport-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport-helper.c b/transport-helper.c index bf37c5280c..b672801ae4 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -630,7 +630,7 @@ static const char *connect_service_cmd(enum git_connect_service service) case GIT_CONNECT_UPLOAD_ARCHIVE: return "git-upload-archive"; } - BUG("unknown git_connect_type: %d", service); + BUG("unknown git_connect_service: %d", service); } static int process_connect_service(struct transport *transport, -- 2.54.0.618.gdbb63b8024