The wire-protocol v2 relies on the client to send "ref prefixes" to
limit the bandwidth spent on the initial ref advertisement. "git
fetch $remote branch:branch" that asks tags that point into the
history leading to the "branch" automatically followed sent to
narrow prefix and broke the tag following, which has been fixed.
* jt/tag-following-with-proto-v2-fix:
fetch: send "refs/tags/" prefix upon CLI refspecs
t5702: test fetch with multiple refspecs at a time
@ -209,6 +209,7 @@ test_expect_success 'ref advertisment is filtered during fetch using protocol v2
@@ -209,6 +209,7 @@ test_expect_success 'ref advertisment is filtered during fetch using protocol v2
test_when_finished "rm -f log" &&
test_commit -C file_parent three &&
git -C file_parent branch unwanted-branch three &&
@ -217,9 +218,8 @@ test_expect_success 'ref advertisment is filtered during fetch using protocol v2
@@ -217,9 +218,8 @@ test_expect_success 'ref advertisment is filtered during fetch using protocol v2
git -C file_parent log -1 --format=%s >expect &&
test_cmp expect actual &&
! grep "refs/tags/one" log &&
! grep "refs/tags/two" log &&
! grep "refs/tags/three" log
grep "refs/heads/master" log &&
! grep "refs/heads/unwanted-branch" log
'
test_expect_success 'server-options are sent when fetching' '
@ -364,6 +364,71 @@ test_expect_success 'default refspec is used to filter ref when fetchcing' '
@@ -364,6 +364,71 @@ test_expect_success 'default refspec is used to filter ref when fetchcing' '
grep "ref-prefix refs/tags/" log
'
test_expect_success 'fetch supports various ways of have lines' '