git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Tan <jonathantanmy@google.com>
To: gitster@pobox.com
Cc: jonathantanmy@google.com, git@vger.kernel.org, bmwill@google.com
Subject: Re: [PATCH v2 2/2] fetch: send "refs/tags/" prefix upon CLI refspecs
Date: Mon, 18 Jun 2018 16:16:42 -0700	[thread overview]
Message-ID: <20180618231642.174650-1-jonathantanmy@google.com> (raw)
In-Reply-To: <xmqqwouvwzsz.fsf@gitster-ct.c.googlers.com>

> Jonathan Tan <jonathantanmy@google.com> writes:
> 
> >> Wouldn't that allow us not having to advertise the whole tags
> >> namespace only to implement the tag following?
> >
> > Yes, it would, but as far as I can tell, it would add an extra burden on
> > the server to walk all refs requested in the ls-refs call (in order to
> > determine which tags to send back in the response). Also, this walk must
> > be done before any negotiation (since this is a ls-refs call),...
> 
> My comment was that I doubt the "must be done" part of the above.
> How would refs-in-want be responded where client-supplied "I want
> 'master' branch---I am not asking for the exact object the first
> server I contacted said where the 'master' is at" gets turned into
> "So the final value of 'master' among these servers that are not
> quite in sync is this" by the one that gives you the pack, not
> necessarily the one that responds to ls-refs upon initial contact?
> Can't we do something similar, i.e. let the client say "I want tags
> that refer to new objects you are going to send me, I do not know
> what they are offhand" and the server that actually gives you the
> pack to say "here are the tags I ended up including"?  The
> "include-tag" process to generate pack with extra objects (i.e. the
> tags that point at packed objects) has to involve walking for
> reachabliity anyway, so as long as the feature is supported,
> somebody has to do the work, and if you want to cut down the
> transfer cost of the refs/tags/* enumeration, it needs to happen on
> the server end, no?

Ah, I think I see. There are these possible worlds:
 (1) the current world
 (2) no ref-in-want, and upload-pack sends tag information as part of
     its response to ls-refs
 (3) no ref-in-want, but upload-pack can send ref information right
     before the packfile
 (4) ref-in-want, and upload-pack will send ref information right before
     the packfile

I was only thinking about (2) and (4), but I think you are talking about
(3). Yes, that would work, although I don't think it's worth the
protocol churn to do (3) then (4), especially since we already have
ref-in-want patches sent to the mailing list - but I should have
discussed this option in my previous e-mails too.

> Or perhaps v2 fetch should implement the automated tag following
> without using include-tag and instead as an extended feature of
> ref-in-want.  I think that is merely giving a different name to the
> same idea outlined above, though ;-)

Instead of not using include-tag, I would define include-tag in
the presence of want-refs to also include the refs, but I agree with
this solution.

  reply	other threads:[~2018-06-18 23:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05 21:16 [PATCH 0/2] Fix protocol v2 tag following with CLI refspec Jonathan Tan
2018-06-05 21:16 ` [PATCH 1/2] t5702: test fetch with multiple refspecs at a time Jonathan Tan
2018-06-05 21:16 ` [PATCH 2/2] fetch: send "refs/tags/" prefix upon CLI refspecs Jonathan Tan
2018-06-05 21:25   ` Brandon Williams
2018-06-05 21:28   ` Brandon Williams
2018-06-05 21:40 ` [PATCH v2 0/2] Fix protocol v2 tag following with CLI refspec Jonathan Tan
2018-06-05 21:40   ` [PATCH v2 1/2] t5702: test fetch with multiple refspecs at a time Jonathan Tan
2018-06-18 18:30     ` Stefan Beller
2018-06-18 19:15       ` Jonathan Tan
2018-06-18 19:32         ` Stefan Beller
2018-06-05 21:40   ` [PATCH v2 2/2] fetch: send "refs/tags/" prefix upon CLI refspecs Jonathan Tan
2018-06-18 19:22     ` Stefan Beller
2018-06-18 19:47       ` Jonathan Tan
2018-06-18 19:53         ` Brandon Williams
2018-06-18 19:58     ` Junio C Hamano
2018-06-18 21:07       ` Jonathan Tan
2018-06-18 21:27         ` Junio C Hamano
2018-06-18 23:16           ` Jonathan Tan [this message]
2018-07-09 17:38     ` Jonathan Nieder
2018-07-09 17:59       ` Brandon Williams
2018-07-09 18:24         ` Junio C Hamano
2018-07-09 18:33           ` Brandon Williams
2018-07-09 20:35             ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20180618231642.174650-1-jonathantanmy@google.com \
    --to=jonathantanmy@google.com \
    --cc=bmwill@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).