From: Jonathan Tan <jonathantanmy@google.com>
To: gitster@pobox.com
Cc: jonathantanmy@google.com, git@vger.kernel.org
Subject: Re: [PATCH 0/2] Skip ls-refs if possible for HTTP
Date: Thu, 22 Aug 2019 10:23:12 -0700 [thread overview]
Message-ID: <20190822172312.41404-1-jonathantanmy@google.com> (raw)
In-Reply-To: <xmqqtva9p3ma.fsf@gitster-ct.c.googlers.com>
> This probably is totally off-tangent, but do any of these "let's
> advertise fewer" changes at the protocol level have to take into
> account the use of --prune option on the client side?
I don't think so. According to what I understand from the documentation,
the prune option prunes based on the RHS of the refspec, and it doesn't
affect anything non-matching. When we advertise fewer, the only refs
that are missing are those that are non-matching anyway.
Some experimentation seems to show that that is the case also:
$ git init one
[snip]
$ git -C one commit --allow-empty -m x
[master (root-commit) 67056ac] x
$ git -C one branch maste
$ git -C one branch other
$ git clone "$(pwd)/one" two
Cloning into 'two'...
done.
$ git -C one branch -d maste
Deleted branch maste (was 67056ac).
$ git -C two checkout --detach HEAD
HEAD is now at 67056ac x
$ GIT_TRACE_PACKET=1 git -c protocol.version=2 -C two fetch --prune origin refs/heads/m*:refs/remotes/origin/m*
[snipped lots of stuff; basically, only refs/heads/master is sent]
10:15:46.308264 pkt-line.c:80 packet: fetch> ref-prefix refs/heads/m
10:15:46.308276 pkt-line.c:80 packet: fetch> ref-prefix refs/tags/
10:15:46.308523 pkt-line.c:80 packet: fetch< 67056ac6d07814334716df760054ac5bec05b66a refs/heads/master
From /usr/local/google/home/jonathantanmy/tmp/g/one
- [deleted] (none) -> origin/maste
$ git -C two for-each-ref
67056ac6d07814334716df760054ac5bec05b66a commit refs/heads/master
67056ac6d07814334716df760054ac5bec05b66a commit refs/remotes/origin/HEAD
67056ac6d07814334716df760054ac5bec05b66a commit refs/remotes/origin/master
67056ac6d07814334716df760054ac5bec05b66a commit refs/remotes/origin/other
(Notice that refs/remotes/origin/other is untouched.)
prev parent reply other threads:[~2019-08-22 17:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-21 22:20 [PATCH 0/2] Skip ls-refs if possible for HTTP Jonathan Tan
2019-08-21 22:20 ` [PATCH 1/2] transport-helper: skip ls-refs if unnecessary Jonathan Tan
2019-08-21 22:20 ` [PATCH 2/2] transport: teach all vtables to allow fetch first Jonathan Tan
2019-08-22 16:27 ` [PATCH 0/2] Skip ls-refs if possible for HTTP Junio C Hamano
2019-08-22 17:23 ` Jonathan Tan [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
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=20190822172312.41404-1-jonathantanmy@google.com \
--to=jonathantanmy@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).