git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 4/5] upload-pack: implement protocol extension "symbolic-ref"
Date: Mon, 01 Dec 2008 06:03:41 -0800	[thread overview]
Message-ID: <7vy6z0q9fm.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 20081130180214.GA10375@coredump.intra.peff.net

Jeff King <peff@peff.net> writes:

> On Sun, Nov 30, 2008 at 01:57:29AM -0800, Junio C Hamano wrote:
> ...
>> This is unfortunate because it forces an extra round trip (receiving end
>> sends a "please tell me symbolic-ref" packet, and then upload side sends
>> "here are the requested information" packet), but it has to be implemented
>> this way because (1) ls-remote may need to ask for this information, in
>> which case there is no "want" to be sent; and (2) the transport API
>> insists that transport_get_remote_refs() returns the final list, and does
>> not allow augmenting what was initially obtained from the call to it by
>> later calls to transport_fetch_refs() easily.
>
> Hrm. For (1), could we allow either interaction method? IOW, allow
> requesting a symref on the first want line, _or_ by separate "symbolic
> ref" packet? That would allow clients who are using "want" to
> piggy-back the symref request as an optimization, but not restrict those
> that just want to ask for it?

I think I found another hole in the protocol that we can use to carry the
"which branch does HEAD points at" information in a backward compatible
way, and it would be a much less intrusive although more sneaky way.  And
it would not have to suffer from the above issues at all.

A patchset follows shortly...

      reply	other threads:[~2008-12-01 14:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-30  9:57 [PATCH 5/5] clone: test the new HEAD detection logic Junio C Hamano
2008-11-30  9:57 ` [PATCH 4/5] upload-pack: implement protocol extension "symbolic-ref" Junio C Hamano
2008-11-30  9:57   ` [PATCH 3/5] clone: find the current branch more explicitly Junio C Hamano
2008-11-30  9:57     ` [PATCH 2/5] get_remote_heads(): do not assume that the conversation is one-way Junio C Hamano
2008-11-30  9:57       ` [PATCH 1/5] upload-pack.c: refactor receive_needs() Junio C Hamano
2008-11-30  9:57         ` [PATCH 0/5] Detecting HEAD more reliably while cloning Junio C Hamano
2008-11-30 10:04           ` Junio C Hamano
2008-12-01  2:54             ` Junio C Hamano
2008-11-30 18:10     ` [PATCH 3/5] clone: find the current branch more explicitly Jeff King
2008-11-30 18:02   ` [PATCH 4/5] upload-pack: implement protocol extension "symbolic-ref" Jeff King
2008-12-01 14:03     ` 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=7vy6z0q9fm.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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).