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

Re: Exec upload-pack on remote with what parameters to get direntries.

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 31, 2021, 14:23 UTC
Message-ID
<87sfypwuwx.fsf@evledraar.gmail.com>
In-Reply-To
<xmqq4kb639xt.fsf@gitster.g>
On Mon, Aug 30 2021, Junio C Hamano wrote:
Show 18 quoted lines
> Jeff King <peff@peff.net> writes:
>
>> Yes. At GitHub we actually have a custom endpoint which hooks up
>> "cat-file --batch" with a format of the client's choosing. That's what
>> (indirectly) feeds things like raw.github.com.
>>
>> I've been tempted to send it upstream, but it's pretty ugly, and does
>> give the client a lot of power (for now, the placeholders you can use
>> with cat-file are not that powerful, but if we start to unify with
>> ref-filter, etc, then we run into situations like we had with
>> %(describe) recently). Likewise, the v2 object-info endpoint _could_
>> accept arbitrary format strings (it's the same idea, just with
>> --batch-check instead of --batch).
>
> Yeah, the object-info actually was from folks who are interested in
> doing something similar, and it would be nice if we can share the
> protocol endpoint that is more suitable for interactive tree and
> history traversal to help those who want to do virtual filesystem.

While this is all clever, I think this discussion really suggests that the first thing we should do is make the relatively recent "object-info" protocol verb not a default part of the supported v2 protocol we ship in git.git.

I.e. someone setting up a git server probably isn't going to suspect that one day their server load is going to go up by some big % because some developer somewhere is using a local IDE whose every file click on a directory is a new remote server request (i.e. the case where "object-info"'s functionality is expanded like this).

I found myself wondering this when reading serve.c the other day, i.e. why we have "always_advertise" for object-info, but it seemed innocuous enough given how it's described in a2ba162cda2 (object-info: support for retrieving object info, 2021-04-20).

But just as a general thing, while I'm very much in favor of git growing *optional* support for more server<->client cooperation and CPU offloading, even things like "git grep" or "git log" optimistically running server-side, I think those sorts of features should definitely be off by default for the reasons noted above.

Previous: Junio C HamanoNext: Bruno Albuquerque
Message 6 of 12 in “Exec upload-pack on remote with what parameters to get direntries.”
  1. Stef BonAug 28, 2021
  2. Jeff KingAug 30, 2021
  3. Junio C HamanoAug 30, 2021
  4. Jeff KingAug 30, 2021
  5. Junio C HamanoAug 30, 2021
  6. Ævar Arnfjörð BjarmasonAug 31, 2021
  7. Bruno AlbuquerqueAug 31, 2021
  8. Junio C HamanoAug 31, 2021
  9. Stef BonAug 31, 2021
  10. Jeff KingAug 31, 2021
  11. Stef BonAug 31, 2021
  12. Ævar Arnfjörð BjarmasonAug 31, 2021

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.