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

Re: [PATCH RFC 1/3] cat-file: extract the transport ownership from get_remote_info()

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 27, 2026, 19:02 UTC
Message-ID
<xmqqpkwvj7bj.fsf@gitster.g>
In-Reply-To
<20261027-remote-object-info-batch-v1-1-ea7a1f0b1df1@gmail.com>
Pablo Sabater <pabloosabaterr@gmail.com> writes:
Show 7 quoted lines
> get_remote_info() receives the name of the remote and from there it
> builds the transport and at the end closes it.
>
> To be able to reuse the connection for multiple batches in a subsequent
> commit, it is needed to extract that responsibility from
> get_remote_info() and instead have it in its caller,
> parse_cmd_remote_object_info(), which will handle the batches.
Makes sense.
> While at it, rename the transport variable 'gtransport' to 'transport',
> as it looks like a global when it's not.

Good move. We started (not particularly this program but the transport layer in general) with a global instance of transport object called gtransport, but the ones that we create on demand and release after we are done are of course local and it is misleading to use such a prefix.

> +	if (!transport->smart_options)
> +		die(_("smart options required"));

Is this an end-user facing error message? I am not sure a user who saw this message can figure out what went wrong or how to correct it.

Previous: Pablo SabaterNext: Pablo Sabater
Message 3 of 12 in “cat-file: make remote-object-info request in batches”
  1. 0/3 cat-file: make remote-object-info request in batchesPablo Sabater, Oct 27, 2026
  2. 1/3 cat-file: extract the transport ownership from get_remote_info()Pablo Sabater, Oct 27, 2026
  3. Junio C HamanoOct 27, 2026
  4. Pablo SabaterOct 27, 2026
  5. Junio C HamanoOct 28, 2026
  6. Pablo SabaterOct 28, 2026
  7. Junio C HamanoOct 28, 2026
  8. 2/3 cat-file: make remote-object-info request in batchesPablo Sabater, Oct 27, 2026
  9. 3/3 cat-file: add --remote-max-batch optionPablo Sabater, Oct 27, 2026
  10. Junio C HamanoOct 27, 2026
  11. Pablo SabaterOct 27, 2026
  12. Junio C HamanoOct 27, 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.