Re: [PATCH RFC 3/5] fetch-object-info: return a status instead of dying
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 30, 2026, 17:07 UTC
- Message-ID
- <xmqqwls2brca.fsf@gitster.g>
- In-Reply-To
- <20260930-backfill-dryrun-v1-3-1128f247ee01@gmail.com>
Pablo Sabater <pabloosabaterr@gmail.com> writes:
Show 9 quoted lines
> A subsequent commit needs fetch_object_info() not to die() when the > object-info capability is not enabled on the server, so that it can > fall back. > > Make fetch_object_info() return FETCH_OBJECT_INFO_NOT_ENABLED instead > of die()'ing when the server does not advertise the object-info > capability, and propagate the status through the transport layer so > that callers of transport_fetch_object_info() can act on it. It is now > up to them whether to die() or fall back.
It may be just me but unless the client can tell between the server not supporting (i.e., they are unable to enable it even if they wanted to) and not enabling (i.e., they are capable, but are not willing to give it to you), it may make sense to report it as "not available". "not enabled" sounds as if we know that it is the latter and not the former.
The code change looks very cleanly done.