git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Pablo SabaterNext: Pablo Sabater
Message 7 of 18 in “Add --dry-run option to git-backfill(1)”
  1. 0/5 Add --dry-run option to git-backfill(1)Pablo Sabater, Sep 30, 2026
  2. 1/5 transport-internal: update fetch_object_info commentPablo Sabater, Sep 30, 2026
  3. 2/5 fetch-object-info: add enum for fetch_object_info() statusesPablo Sabater, Sep 30, 2026
  4. Karthik NayakSep 30, 2026
  5. Pablo SabaterSep 30, 2026
  6. 3/5 fetch-object-info: return a status instead of dyingPablo Sabater, Sep 30, 2026
  7. Junio C HamanoSep 30, 2026
  8. Pablo SabaterSep 30, 2026
  9. Junio C HamanoSep 30, 2026
  10. 4/5 backfill: add --dry-run optionPablo Sabater, Sep 30, 2026
  11. Karthik NayakSep 30, 2026
  12. Pablo SabaterSep 30, 2026
  13. 5/5 backfill: report total size of missing blobs in --dry-runPablo Sabater, Sep 30, 2026
  14. Junio C HamanoSep 30, 2026
  15. Pablo SabaterSep 30, 2026
  16. Derrick StoleeSep 30, 2026
  17. Pablo SabaterSep 30, 2026
  18. Junio C HamanoSep 30, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.