summaryrefslogtreecommitdiff
path: root/t/t5616-partial-clone.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t5616-partial-clone.sh')
-rwxr-xr-xt/t5616-partial-clone.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh
index 8e726f1..5cb4153 100755
--- a/t/t5616-partial-clone.sh
+++ b/t/t5616-partial-clone.sh
@@ -254,6 +254,14 @@ test_expect_success 'implicitly construct combine: filter with repeated flags' '
test_cmp unique_types.expected unique_types.actual
'
+test_expect_success 'upload-pack complains of bogus filter config' '
+ printf 0000 |
+ test_must_fail git \
+ -c uploadpackfilter.tree.maxdepth \
+ upload-pack . >/dev/null 2>err &&
+ test_i18ngrep "unable to parse.*tree.maxdepth" err
+'
+
test_expect_success 'upload-pack fails banned object filters' '
test_config -C srv.bare uploadpackfilter.blob:none.allow false &&
test_must_fail ok=sigpipe git clone --no-checkout --filter=blob:none \
@@ -284,7 +292,15 @@ test_expect_success 'upload-pack limits tree depth filters' '
test_config -C srv.bare uploadpackfilter.tree.maxDepth 0 &&
test_must_fail ok=sigpipe git clone --no-checkout --filter=tree:1 \
"file://$(pwd)/srv.bare" pc3 2>err &&
- test_i18ngrep "tree filter allows max depth 0, but got 1" err
+ test_i18ngrep "tree filter allows max depth 0, but got 1" err &&
+
+ git clone --no-checkout --filter=tree:0 "file://$(pwd)/srv.bare" pc4 &&
+
+ test_config -C srv.bare uploadpackfilter.tree.maxDepth 5 &&
+ git clone --no-checkout --filter=tree:5 "file://$(pwd)/srv.bare" pc5 &&
+ test_must_fail ok=sigpipe git clone --no-checkout --filter=tree:6 \
+ "file://$(pwd)/srv.bare" pc6 2>err &&
+ test_i18ngrep "tree filter allows max depth 5, but got 6" err
'
test_expect_success 'partial clone fetches blobs pointed to by refs even if normally filtered out' '