1151
# unadvertised objects, so restrict this test to v0.
1152
1153
# fetching the hidden object should fail by default
1154
- test_must_fail env GIT_TEST_PROTOCOL_VERSION= \
1154
+ test_must_fail env GIT_TEST_PROTOCOL_VERSION=0 \
1155
git fetch -v ../testrepo $the_commit:refs/heads/copy 2>err &&
1156
test_i18ngrep "Server does not allow request for unadvertised object" err &&
1157
test_must_fail git rev-parse --verify refs/heads/copy &&
1210
cd shallow &&
1211
# Some protocol versions (e.g. 2) support fetching
1212
# unadvertised objects, so restrict this test to v0.
1213
- test_must_fail env GIT_TEST_PROTOCOL_VERSION= \
1213
+ test_must_fail env GIT_TEST_PROTOCOL_VERSION=0 \
1214
git fetch --depth=1 ../testrepo/.git $SHA1 &&
1215
git --git-dir=../testrepo/.git config uploadpack.allowreachablesha1inwant true &&
1216
git fetch --depth=1 ../testrepo/.git $SHA1 &&
1241
cd shallow &&
1242
# Some protocol versions (e.g. 2) support fetching
1243
# unadvertised objects, so restrict this test to v0.
1244
- test_must_fail env GIT_TEST_PROTOCOL_VERSION= \
1244
+ test_must_fail env GIT_TEST_PROTOCOL_VERSION=0 \
1245
git fetch ../testrepo/.git $SHA1_3 &&
1246
- test_must_fail env GIT_TEST_PROTOCOL_VERSION= \
1246
+ test_must_fail env GIT_TEST_PROTOCOL_VERSION=0 \
1247
git fetch ../testrepo/.git $SHA1_1 &&
1248
git --git-dir=../testrepo/.git config uploadpack.allowreachablesha1inwant true &&
1249
git fetch ../testrepo/.git $SHA1_1 &&
1251
test_must_fail git cat-file commit $SHA1_2 &&
1252
git fetch ../testrepo/.git $SHA1_2 &&
1253
git cat-file commit $SHA1_2 &&
1254
- test_must_fail env GIT_TEST_PROTOCOL_VERSION= \
1254
+ test_must_fail env GIT_TEST_PROTOCOL_VERSION=0 \
1255
git fetch ../testrepo/.git $SHA1_3 2>err &&
1256
test_i18ngrep "remote error:.*not our ref.*$SHA1_3\$" err
1257
)
1291
git -C testrepo commit --allow-empty -m two &&
1292
git -C testrepo tag -m foo mytag HEAD^ &&
1293
oid=$(git -C testrepo rev-parse mytag^{commit}) &&
1294
- test_must_fail env GIT_TEST_PROTOCOL_VERSION= \
1294
+ test_must_fail env GIT_TEST_PROTOCOL_VERSION=0 \
1295
git fetch testrepo $oid 2>err &&
1296
test_i18ngrep "Server does not allow request for unadvertised object" err
1297
'