* filtering on git fetch?
@ 2020-06-17 7:41 Noel Grandin
2020-06-17 8:34 ` Jeff King
0 siblings, 1 reply; 4+ messages in thread
From: Noel Grandin @ 2020-06-17 7:41 UTC (permalink / raw)
To: Git List
Hi
Setup
(*) I'm fetching across a transatlantic link (RTT in the 300ms range on a good day)
(*) I'm fetching from a gerrit server
$ GIT_PACKET_TRACE=true git fetch
shows tons and tons of
09:39:43.355675 pkt-line.c:80 packet: fetch< 3a7ad7ee5d7daa0c93a80fbb32a677597d81ac75
refs/changes/00/9000/3
09:39:43.355684 pkt-line.c:80 packet: fetch< 6cacf1db5311f6b250ebaa12c71419a8ff9b747e
refs/changes/00/9000/meta
09:39:43.355693 pkt-line.c:80 packet: fetch< 849a43434a5ede9ce9b70da14231f34edb2593fb
refs/changes/00/90100/1
type stuff before it starts fetching the updates to master that I am interested in.
Is there any way to tell the remote git server that I'm only interested in a subset of stuff?
Thanks, Noel Grandin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: filtering on git fetch?
2020-06-17 7:41 filtering on git fetch? Noel Grandin
@ 2020-06-17 8:34 ` Jeff King
2020-06-17 8:42 ` Noel Grandin
0 siblings, 1 reply; 4+ messages in thread
From: Jeff King @ 2020-06-17 8:34 UTC (permalink / raw)
To: Noel Grandin; +Cc: Git List
On Wed, Jun 17, 2020 at 09:41:37AM +0200, Noel Grandin wrote:
> Setup
>
> (*) I'm fetching across a transatlantic link (RTT in the 300ms range on a good day)
> (*) I'm fetching from a gerrit server
>
> $ GIT_PACKET_TRACE=true git fetch
>
> shows tons and tons of
>
> 09:39:43.355675 pkt-line.c:80 packet: fetch<
> 3a7ad7ee5d7daa0c93a80fbb32a677597d81ac75 refs/changes/00/9000/3
> 09:39:43.355684 pkt-line.c:80 packet: fetch<
> 6cacf1db5311f6b250ebaa12c71419a8ff9b747e refs/changes/00/9000/meta
> 09:39:43.355693 pkt-line.c:80 packet: fetch<
> 849a43434a5ede9ce9b70da14231f34edb2593fb refs/changes/00/90100/1
>
> type stuff before it starts fetching the updates to master that I am interested in.
>
> Is there any way to tell the remote git server that I'm only interested in a subset of stuff?
The ref advertisement in the v0 protocol is unconditional and always
complete. In v2, the client is able to specify which parts of the
namespace it cares about.
Try:
GIT_TRACE_PACKET=1 git -c protocol.version=2
This will probably be the default in v2.28 (it was the default in v2.26,
but there was a performance regression, so we backed it out for v2.27).
-Peff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: filtering on git fetch?
2020-06-17 8:34 ` Jeff King
@ 2020-06-17 8:42 ` Noel Grandin
2020-06-17 11:32 ` Jeff King
0 siblings, 1 reply; 4+ messages in thread
From: Noel Grandin @ 2020-06-17 8:42 UTC (permalink / raw)
To: Jeff King; +Cc: Git List
On 2020/06/17 10:34 am, Jeff King wrote:
>
> The ref advertisement in the v0 protocol is unconditional and always
> complete. In v2, the client is able to specify which parts of the
> namespace it cares about.
Thanks
I tried (BTW my version is 2.26.2)
$ GIT_TRACE_PACKET=1 git -c protocol.version=2 pull -r
and the first few lines look like
10:35:59.323490 pkt-line.c:80 packet: fetch< ad0351b84926075297fb74abbe9b31a0455782af HEAD\0
include-tag multi_ack_detailed multi_ack o
fs-delta side-band side-band-64k thin-pack no-progress shallow agent=JGit/5.3.7.202002110540-r symref=HEAD:refs/heads/master
10:35:59.323583 pkt-line.c:80 packet: fetch< baeb5486c43d39b063371f91cfaae8efc2c8700b
refs/changes/00/1000/1
10:35:59.323592 pkt-line.c:80 packet: fetch< c5fb3d3f110f652e3c4b3920f71b7f77c227028e
refs/changes/00/1000/meta
10:35:59.323597 pkt-line.c:80 packet: fetch< dfbfb3c4d4cc7d7f519c197ef5cfa250c30b584b
refs/changes/00/10000/1
10:35:59.323602 pkt-line.c:80 packet: fetch< 5955e7d66d9b0e87f93fd9746a85bff132da9794
refs/changes/00/10000/2
10:35:59.323608 pkt-line.c:80 packet: fetch< ae3baacef7926d9ce9ca4786176f404b7cf78cc1
refs/changes/00/10000/meta
Is there something else I need to do on the client-side to make this work?
Noting that the git server at gerrit.libreoffice.org might be a JGit based thing, so maybe I need to log a feature
request there to support v2?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: filtering on git fetch?
2020-06-17 8:42 ` Noel Grandin
@ 2020-06-17 11:32 ` Jeff King
0 siblings, 0 replies; 4+ messages in thread
From: Jeff King @ 2020-06-17 11:32 UTC (permalink / raw)
To: Noel Grandin; +Cc: Git List
On Wed, Jun 17, 2020 at 10:42:24AM +0200, Noel Grandin wrote:
> I tried (BTW my version is 2.26.2)
>
> $ GIT_TRACE_PACKET=1 git -c protocol.version=2 pull -r
Ah, yeah, I think it should be the default in that version anyway.
> and the first few lines look like
>
> 10:35:59.323490 pkt-line.c:80 packet: fetch<
> ad0351b84926075297fb74abbe9b31a0455782af HEAD\0 include-tag
> multi_ack_detailed multi_ack o
> fs-delta side-band side-band-64k thin-pack no-progress shallow agent=JGit/5.3.7.202002110540-r symref=HEAD:refs/heads/master
Yep, that's definitely v0.
> Is there something else I need to do on the client-side to make this work?
No, probably the server doesn't support v2. I double-checked myself, and
couldn't get it to speak v2 either.
> Noting that the git server at gerrit.libreoffice.org might be a JGit based
> thing, so maybe I need to log a feature request there to support v2?
Probably. I'm fairly certain that JGit has supported v2 for a while.
Just poking at `git log` in jgit.git shows some commits adding it around
the 5.0 timeframe. So I'd think the version they're advertising would
have it. I don't know offhand if there's a config option they'd need to
flip on the server.
-Peff
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-17 11:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 7:41 filtering on git fetch? Noel Grandin
2020-06-17 8:34 ` Jeff King
2020-06-17 8:42 ` Noel Grandin
2020-06-17 11:32 ` Jeff King
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).