Git fork

Merge branch 'tb/fetch-follow-tags-fix'

* tb/fetch-follow-tags-fix:
fetch: fix following tags when fetching specific OID

+17 -1
+3 -1
builtin/fetch.c
··· 1777 1777 1778 1778 if (uses_remote_tracking(transport, rs)) { 1779 1779 must_list_refs = 1; 1780 - strvec_push(&transport_ls_refs_options.ref_prefixes, "HEAD"); 1780 + if (transport_ls_refs_options.ref_prefixes.nr) 1781 + strvec_push(&transport_ls_refs_options.ref_prefixes, 1782 + "HEAD"); 1781 1783 } 1782 1784 1783 1785 if (must_list_refs) {
+14
t/t5503-tagfollow.sh
··· 160 160 test_cmp expect actual 161 161 ' 162 162 163 + test_expect_success 'fetch specific OID with tag following' ' 164 + git init --bare clone3.git && 165 + ( 166 + cd clone3.git && 167 + git remote add origin .. && 168 + git fetch origin $B:refs/heads/main && 169 + 170 + git -C .. for-each-ref >expect && 171 + git for-each-ref >actual && 172 + 173 + test_cmp expect actual 174 + ) 175 + ' 176 + 163 177 test_done