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

Re: [PATCH] Add builtin dump command, to query a repository using a pipe.

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 26, 2008, 09:46 UTC
Message-ID
<7vr6g4zzpn.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<7vve5hyln3.fsf@gitster.siamese.dyndns.org>
Another thing.

As currently written, the "dump" server is strictly one-request, one-response interface.

I can easily see the command set to be extended to allow transfer of richer set of data (e.g. whether a ref is a symref and if so where it points at, querying config variables). Also, if you want to write a repository browser using this "dump" server, you would first throw a commit at it, learn its parents and its tree, and then you suddenly have _many_ objects that you can simultaneously ask about without doing one-request, one-response exchange.

So it might make sense to base this not on line-per-line message format using strbuf_getline() interface, but base it instead on packet_read_line()/packet_write() interface, and explicitly mark the end of a batch of request with packet_flush(). That would allow the "protocol" stream, which would matter even more when you run this over the network, perhaps via git-daemon and/or from connect.c

  
Previous: Junio C Hamano
Message 3 of 3 in “Add builtin dump command, to query a repository using a pipe.”
  1. Add builtin dump command, to query a repository using a pipe.Han-Wen Nienhuys, Jan 26, 2008
  2. Junio C HamanoJan 26, 2008
  3. Junio C HamanoJan 26, 2008

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.