git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Han-Wen Nienhuys <hanwen@google.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Add builtin dump command, to query a repository using a pipe.
Date: Sat, 26 Jan 2008 01:46:28 -0800	[thread overview]
Message-ID: <7vr6g4zzpn.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7vve5hyln3.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Sat, 26 Jan 2008 01:35:44 -0800")

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


  

      reply	other threads:[~2008-01-26  9:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-26  0:24 [PATCH] Add builtin dump command, to query a repository using a pipe Han-Wen Nienhuys
2008-01-26  9:35 ` Junio C Hamano
2008-01-26  9:46   ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vr6g4zzpn.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=hanwen@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).