From: Patrick Steinhardt Date: Thu, 26 Mar 2026 12:20:57 GMT Subject: Re: [PATCH 04/16] promisor-remote: clarify that a remote is ignored Message-ID: In-Reply-To: <20260323080520.887550-5-christian.couder@gmail.com> On Mon, Mar 23, 2026 at 09:05:07AM +0100, Christian Couder wrote: > In should_accept_remote() when a remote is ignored, we might tell users > why it is ignored in a warning, but we don't tell them that the remote > is actually ignored. > > Let's clarify that, so users have a better idea of what's actually > happening. Interesting that this doesn't result in any test changes. Don't we have test coverage for `should_accept_remote()`? > diff --git a/promisor-remote.c b/promisor-remote.c > index 3f8aeee787..f5c4d41155 100644 > --- a/promisor-remote.c > +++ b/promisor-remote.c > @@ -660,15 +660,16 @@ static int should_accept_remote(enum accept_promisor accept, > BUG("Unhandled 'enum accept_promisor' value '%d'", accept); > > if (!remote_url || !*remote_url) { > - warning(_("no or empty URL advertised for remote '%s'"), remote_name); > + warning(_("no or empty URL advertised for remote '%s', " > + "ignoring this remote"), remote_name); > return 0; > } > > if (!strcmp(p->url, remote_url)) > return all_fields_match(advertised, config_info, 0); > > - warning(_("known remote named '%s' but with URL '%s' instead of '%s'"), > - remote_name, p->url, remote_url); > + warning(_("known remote named '%s' but with URL '%s' instead of '%s', " > + "ignoring this remote"), remote_name, p->url, remote_url); > > return 0; > } The change itself seems sensible to me. Patrick