pack-objects: document about thread synchronization
[gitweb.git] / t / t5702-protocol-v2.sh
index 4ad5c5769b4eab56d840709ee0bc0affa8de2e01..a4fe6508bdd73784758b2ea80ab81752e15c01b3 100755 (executable)
@@ -345,6 +345,20 @@ test_expect_success 'even with handcrafted request, filter does not work if not
        git -C server serve --stateless-rpc <in >/dev/null
 '
 
+test_expect_success 'default refspec is used to filter ref when fetchcing' '
+       test_when_finished "rm -f log" &&
+
+       GIT_TRACE_PACKET="$(pwd)/log" git -C file_child -c protocol.version=2 \
+               fetch origin &&
+
+       git -C file_child log -1 --format=%s three >actual &&
+       git -C file_parent log -1 --format=%s three >expect &&
+       test_cmp expect actual &&
+
+       grep "ref-prefix refs/heads/" log &&
+       grep "ref-prefix refs/tags/" log
+'
+
 # Test protocol v2 with 'http://' transport
 #
 . "$TEST_DIRECTORY"/lib-httpd.sh