Signed-off-by: Jonathan Tan <[email protected]>
---
 t/t5500-fetch-pack.sh    | 13 +++++++------
 t/t5616-partial-clone.sh |  3 +--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 9c18875c9c..a5a8f348a2 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -41,8 +41,7 @@ pull_to_client () {
        test_expect_success "$number pull" '
                (
                        cd client &&
-                       GIT_TEST_PROTOCOL_VERSION=0 \
-                               git fetch-pack -k -v .. $heads &&
+                       git fetch-pack -k -v .. $heads &&
 
                        case "$heads" in
                            *A*)
@@ -441,7 +440,6 @@ test_expect_success 'setup tests for the --stdin parameter' 
'
 '
 
 test_expect_success 'fetch refs from cmdline' '
-       sane_unset GIT_TEST_PROTOCOL_VERSION &&
        (
                cd client &&
                git fetch-pack --no-progress .. $(cat ../input)
@@ -630,7 +628,10 @@ test_expect_success 'fetch-pack cannot fetch a raw sha1 
that is not advertised a
        test_commit -C server 6 &&
 
        git init client &&
-       test_must_fail git -C client fetch-pack ../server \
+
+       # Other protocol versions (e.g. 2) allow fetching an unadvertised
+       # object, so run this test with the default protocol version (0).
+       test_must_fail env --unset=GIT_TEST_PROTOCOL_VERSION git -C client 
fetch-pack ../server \
                $(git -C server rev-parse refs/heads/master^) 2>err &&
        test_i18ngrep "Server does not allow request for unadvertised object" 
err
 '
@@ -790,7 +791,7 @@ test_expect_success 'shallow clone exclude tag two' '
 '
 
 test_expect_success 'fetch exclude tag one' '
-       git -C shallow12 fetch --shallow-exclude one origin &&
+       env --unset=GIT_TEST_PROTOCOL_VERSION git -C shallow12 fetch 
--shallow-exclude one origin &&
        git -C shallow12 log --pretty=tformat:%s origin/master >actual &&
        test_write_lines three two >expected &&
        test_cmp expected actual
@@ -808,7 +809,7 @@ test_expect_success 'fetching deepen' '
        git -C deepen log --pretty=tformat:%s master >actual &&
        echo three >expected &&
        test_cmp expected actual &&
-       git -C deepen fetch --deepen=1 &&
+       env --unset=GIT_TEST_PROTOCOL_VERSION git -C deepen fetch --deepen=1 &&
        git -C deepen log --pretty=tformat:%s origin/master >actual &&
        cat >expected <<-\EOF &&
        four
diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh
index feedf84ce1..336f02a41a 100755
--- a/t/t5616-partial-clone.sh
+++ b/t/t5616-partial-clone.sh
@@ -144,8 +144,7 @@ test_expect_success 'manual prefetch of missing objects' '
        sort >observed.oids &&
 
        test_line_count = 6 observed.oids &&
-       GIT_TEST_PROTOCOL_VERSION=0 \
-               git -C pc1 fetch-pack --stdin "file://$(pwd)/srv.bare" 
<observed.oids &&
+       git -C pc1 fetch-pack --stdin "file://$(pwd)/srv.bare" <observed.oids &&
 
        git -C pc1 rev-list --quiet --objects --missing=print \
                master..origin/master >revs &&
-- 
2.19.0.271.gfe8321ec05.dirty

Reply via email to