Fourth batch
[gitweb.git] / t / t5552-skipping-fetch-negotiator.sh
index 5ad5bece55620138ce76579abb6e76c0710d126d..f70cbcc9cabf6499de57529cbfa095ed9eff73e3 100755 (executable)
@@ -46,7 +46,7 @@ test_expect_success 'commits with no parents are sent regardless of skip distanc
        test_commit -C server to_fetch &&
 
        git init client &&
-       for i in $(seq 7)
+       for i in $(test_seq 7)
        do
                test_commit -C client c$i
        done &&
@@ -60,36 +60,13 @@ test_expect_success 'commits with no parents are sent regardless of skip distanc
        have_not_sent c6 c4 c3
 '
 
-test_expect_success 'unknown fetch.negotiationAlgorithm values error out' '
-       rm -rf server client trace &&
-       git init server &&
-       test_commit -C server to_fetch &&
-
-       git init client &&
-       test_commit -C client on_client &&
-       git -C client checkout on_client &&
-
-       test_config -C client fetch.negotiationAlgorithm invalid &&
-       test_must_fail git -C client fetch "$(pwd)/server" 2>err &&
-       test_i18ngrep "unknown fetch negotiation algorithm" err &&
-
-       # Explicit "default" value
-       test_config -C client fetch.negotiationAlgorithm default &&
-       git -C client -c fetch.negotiationAlgorithm=default fetch "$(pwd)/server" &&
-
-       # Implementation detail: If there is nothing to fetch, we will not error out
-       test_config -C client fetch.negotiationAlgorithm invalid &&
-       git -C client fetch "$(pwd)/server" 2>err &&
-       test_i18ngrep ! "unknown fetch negotiation algorithm" err
-'
-
 test_expect_success 'when two skips collide, favor the larger one' '
        rm -rf server client trace &&
        git init server &&
        test_commit -C server to_fetch &&
 
        git init client &&
-       for i in $(seq 11)
+       for i in $(test_seq 11)
        do
                test_commit -C client c$i
        done &&
@@ -127,7 +104,10 @@ test_expect_success 'use ref advertisement to filter out commits' '
        # not need to send any ancestors of "c3", but we still need to send "c3"
        # itself.
        test_config -C client fetch.negotiationalgorithm skipping &&
-       trace_fetch client origin to_fetch &&
+
+       # The ref advertisement itself is filtered when protocol v2 is used, so
+       # use v0.
+       GIT_TEST_PROTOCOL_VERSION= trace_fetch client origin to_fetch &&
        have_sent c5 c4^ c2side &&
        have_not_sent c4 c4^^ c4^^^
 '
@@ -168,14 +148,14 @@ test_expect_success 'do not send "have" with ancestors of commits that server AC
        test_commit -C server to_fetch &&
 
        git init client &&
-       for i in $(seq 8)
+       for i in $(test_seq 8)
        do
                git -C client checkout --orphan b$i &&
                test_commit -C client b$i.c0
        done &&
-       for j in $(seq 19)
+       for j in $(test_seq 19)
        do
-               for i in $(seq 8)
+               for i in $(test_seq 8)
                do
                        git -C client checkout b$i &&
                        test_commit -C client b$i.c$j
@@ -205,7 +185,7 @@ test_expect_success 'do not send "have" with ancestors of commits that server AC
 
        # fetch-pack should thus not send any more commits in the b1 branch, but
        # should still send the others (in this test, just check b2).
-       for i in $(seq 0 8)
+       for i in $(test_seq 0 8)
        do
                have_not_sent b1.c$i
        done &&