test_expect_success "clone with promisor.advertise set to 'true'" '
git -C server config promisor.advertise true &&
+ test_when_finished "rm -rf client" &&
# Clone from server to create a client
GIT_NO_LAZY_FETCH=0 git clone -c remote.lop.promisor=true \
-c remote.lop.url="file://$(pwd)/lop" \
-c promisor.acceptfromserver=All \
--no-local --filter="blob:limit=5k" server client &&
- test_when_finished "rm -rf client" &&
# Check that the largest object is still missing on the server
check_missing_objects server 1 "$oid"
test_expect_success "clone with promisor.advertise set to 'false'" '
git -C server config promisor.advertise false &&
+ test_when_finished "rm -rf client" &&
# Clone from server to create a client
GIT_NO_LAZY_FETCH=0 git clone -c remote.lop.promisor=true \
-c remote.lop.url="file://$(pwd)/lop" \
-c promisor.acceptfromserver=All \
--no-local --filter="blob:limit=5k" server client &&
- test_when_finished "rm -rf client" &&
# Check that the largest object is not missing on the server
check_missing_objects server 0 "" &&
test_expect_success "clone with promisor.acceptfromserver set to 'None'" '
git -C server config promisor.advertise true &&
+ test_when_finished "rm -rf client" &&
# Clone from server to create a client
GIT_NO_LAZY_FETCH=0 git clone -c remote.lop.promisor=true \
-c remote.lop.url="file://$(pwd)/lop" \
-c promisor.acceptfromserver=None \
--no-local --filter="blob:limit=5k" server client &&
- test_when_finished "rm -rf client" &&
# Check that the largest object is not missing on the server
check_missing_objects server 0 "" &&
test_expect_success "init + fetch with promisor.advertise set to 'true'" '
git -C server config promisor.advertise true &&
-
test_when_finished "rm -rf client" &&
+
mkdir client &&
git -C client init &&
git -C client config remote.lop.promisor true &&
test_expect_success "clone with promisor.acceptfromserver set to 'KnownName'" '
git -C server config promisor.advertise true &&
+ test_when_finished "rm -rf client" &&
# Clone from server to create a client
GIT_NO_LAZY_FETCH=0 git clone -c remote.lop.promisor=true \
-c remote.lop.url="file://$(pwd)/lop" \
-c promisor.acceptfromserver=KnownName \
--no-local --filter="blob:limit=5k" server client &&
- test_when_finished "rm -rf client" &&
# Check that the largest object is still missing on the server
check_missing_objects server 1 "$oid"
test_expect_success "clone with 'KnownName' and different remote names" '
git -C server config promisor.advertise true &&
+ test_when_finished "rm -rf client" &&
# Clone from server to create a client
GIT_NO_LAZY_FETCH=0 git clone -c remote.serverTwo.promisor=true \
-c remote.serverTwo.url="file://$(pwd)/lop" \
-c promisor.acceptfromserver=KnownName \
--no-local --filter="blob:limit=5k" server client &&
- test_when_finished "rm -rf client" &&
# Check that the largest object is not missing on the server
check_missing_objects server 0 "" &&
test_expect_success "clone with promisor.acceptfromserver set to 'KnownUrl'" '
git -C server config promisor.advertise true &&
+ test_when_finished "rm -rf client" &&
# Clone from server to create a client
GIT_NO_LAZY_FETCH=0 git clone -c remote.lop.promisor=true \
-c remote.lop.url="file://$(pwd)/lop" \
-c promisor.acceptfromserver=KnownUrl \
--no-local --filter="blob:limit=5k" server client &&
- test_when_finished "rm -rf client" &&
# Check that the largest object is still missing on the server
check_missing_objects server 1 "$oid"
ln -s lop serverTwo &&
git -C server config promisor.advertise true &&
+ test_when_finished "rm -rf client" &&
# Clone from server to create a client
GIT_NO_LAZY_FETCH=0 git clone -c remote.lop.promisor=true \
-c remote.lop.url="file://$(pwd)/serverTwo" \
-c promisor.acceptfromserver=KnownUrl \
--no-local --filter="blob:limit=5k" server client &&
- test_when_finished "rm -rf client" &&
# Check that the largest object is not missing on the server
check_missing_objects server 0 "" &&