On Fri, Jun 21, 2024 at 5:23 AM Toon Claes <toon@xxxxxxxxx> wrote: > A bundle URI can serve a gitformat-bundle(5) or a bundle list. This > plain text file is in the Git config format containing other bundle > URIs. To avoid these bundle lists to nest too deep, we've set a limit > with `max_bundle_uri_depth`. Although, when walk through the tree of > bundles, the current depth is incremented in download_bundle_list() and > then calls download_bundle_to_file(), which also increments the depth. > Remove the increment in download_bundle_to_file(). > > Signed-off-by: Toon Claes <toon@xxxxxxxxx> > --- > diff --git a/t/t5558-clone-bundle-uri.sh b/t/t5558-clone-bundle-uri.sh > @@ -259,6 +259,68 @@ test_expect_success 'clone bundle list (file, any mode, all failures)' ' > +test_expect_success 'clone bundle list (file, above max depth)' ' > + cat >bundle-list-1 <<-EOF && > + [bundle] > + version = 1 > + mode = any > + > + [bundle "bundle-list-2"] > + uri = file://$(pwd)/bundle-list-2 > + EOF > + > + cat >bundle-list-2 <<-EOF && > + [bundle] > + version = 1 > + mode = any > + > + [bundle "bundle-list-3"] > + uri = file://$(pwd)/bundle-list-3 > + EOF > + [...] A very minor (and subjective) comment beyond those offered by other reviewers... The above "setup" functionality can be collapsed to: for i in $(test_seq 4) do cat >bundle-list-$i <<-EOF || return 1 [bundle] version = 1 mode = any [bundle "bundle-list-$(($i + 1))"] uri = file://$(pwd)/bundle-list-$(($i + 1)) EOF done