From: Patrick Steinhardt Date: Thu, 26 Mar 2026 12:21:22 GMT Subject: Re: [PATCH 11/16] promisor-remote: refactor should_accept_remote() control flow Message-ID: In-Reply-To: <20260323080520.887550-12-christian.couder@gmail.com> On Mon, Mar 23, 2026 at 09:05:14AM +0100, Christian Couder wrote: > diff --git a/promisor-remote.c b/promisor-remote.c > index 8f2c1280c3..c2f0eb7223 100644 > --- a/promisor-remote.c > +++ b/promisor-remote.c > @@ -665,6 +665,12 @@ static int should_accept_remote(enum accept_promisor accept, > const char *remote_name = advertised->name; > const char *remote_url = advertised->url; > > + if (!remote_url || !*remote_url) { > + warning(_("no or empty URL advertised for remote '%s', " > + "ignoring this remote"), remote_name); > + return 0; > + } > + > if (accept == ACCEPT_ALL) > return all_fields_match(advertised, config_info, NULL); > You mention that it shouldn't change behaviour in well-defined cases where the remote sends non-empty URLs. But does it change behaviour in ill-defined cases where the remote sends empty ones? In other words, does this fix a bug that can be hit in the real world? Patrick