summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-12-17 15:06:40 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-12-17 15:06:40 -0800
commit21127fa9829da1f7b805e44517970194490567d0 (patch)
tree88eaf57a33c0e0f73bacb984898a007698ca4ff9 /t
parentMerge branch 'js/t7900-protect-pwd-in-config-get' (diff)
parentupload-pack.c: don't free allowed_filters util pointers (diff)
downloadtgif-21127fa9829da1f7b805e44517970194490567d0.tar.xz
Merge branch 'tb/partial-clone-filters-fix'
Fix potential server side resource deallocation issues when responding to a partial clone request. * tb/partial-clone-filters-fix: upload-pack.c: don't free allowed_filters util pointers builtin/clone.c: don't ignore transport_fetch_refs() errors
Diffstat (limited to 't')
-rwxr-xr-xt/t5616-partial-clone.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh
index 2ea66205cf..d98c550267 100755
--- a/t/t5616-partial-clone.sh
+++ b/t/t5616-partial-clone.sh
@@ -289,7 +289,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' '