diff options
| author | Brandon Williams <bmwill@google.com> | 2018-07-20 15:07:54 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-07-20 15:25:19 -0700 |
| commit | 402c47d939160acc389bbff083fbce9f5482a275 (patch) | |
| tree | c782b9a46c21ab20d975deac0b3e780246870748 /t/t5702-protocol-v2.sh | |
| parent | 53f9a3e157dbbc901a02ac2c73346d375e24978c (diff) | |
| download | git-402c47d939160acc389bbff083fbce9f5482a275.tar.gz | |
clone: send ref-prefixes when using protocol v2
Teach clone to send a list of ref-prefixes, when using protocol v2, to
allow the server to filter out irrelevant references from the
ref-advertisement. This reduces wasted time and bandwidth when cloning
repositories with a larger number of references.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5702-protocol-v2.sh')
| -rwxr-xr-x | t/t5702-protocol-v2.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh index a4fe6508bd..9ae560eb2a 100755 --- a/t/t5702-protocol-v2.sh +++ b/t/t5702-protocol-v2.sh @@ -181,7 +181,12 @@ test_expect_success 'clone with file:// using protocol v2' ' test_cmp expect actual && # Server responded using protocol v2 - grep "clone< version 2" log + grep "clone< version 2" log && + + # Client sent ref-prefixes to filter the ref-advertisement + grep "ref-prefix HEAD" log && + grep "ref-prefix refs/heads/" log && + grep "ref-prefix refs/tags/" log ' test_expect_success 'fetch with file:// using protocol v2' ' |
