[PATCH 18/24] t5616: use correct filter syntax
Jonathan Tan
Johannes Schindelin
brian m. carlson
See Also
2020-01-13 12:38:51 UTC
In the setup steps for the promisor remote tests, we clone a repository
and filter out all trees with depth greater than or equal to zero, which
also filters out all blobs.

With SHA-1, this test passes because the object we happen to request
from the server is the blob that the promisor remote has.  However, due
to a different ordering with SHA-256, we request the tree containing
that blob, which the promisor remote does not have.  As a consequence,
we fail with a "not our ref" error.

Since what we want to test is that the blob is transferred, let's adjust
the filter to just filter out blobs, not trees.  That means that we'll
transfer the previously problematic tree as part of the normal clone,
and we can then test that the blob is fetched from the promisor remote
as expected.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
 t/t5616-partial-clone.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh
index fea56cda6d..9fd6e780f9 100755
--- a/t/t5616-partial-clone.sh
+++ b/t/t5616-partial-clone.sh
@@ -317,7 +317,7 @@ setup_triangle () {
 	cp big-blob.txt server &&
 	git -C server add big-blob.txt &&
 	git -C server commit -m "initial" &&
-	git clone --bare --filter=tree:0 "file://$(pwd)/server" client &&
+	git clone --bare --filter=blob:none "file://$(pwd)/server" client &&
 	echo another line >>server/big-blob.txt &&
 	git -C server commit -am "append line to big blob" &&