Re: [PATCH 04/16] promisor-remote: clarify that a remote is ignored
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Mar 26, 2026, 12:20 UTC
- Message-ID
- <acUkqRUSyRUysf-I@pks.im>
- In-Reply-To
- <20260323080520.887550-5-christian.couder@gmail.com>
On Mon, Mar 23, 2026 at 09:05:07AM +0100, Christian Couder wrote:
Show 6 quoted lines
> 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()`?
Show 24 quoted lines
> 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