summaryrefslogtreecommitdiff
path: root/t/t5616-partial-clone.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-12-03 08:09:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-12-03 18:25:13 (GMT)
commitd43a21bdbbaf0bc286df8d8e2e29a3e9caa448e8 (patch)
treec042749d6a3ee007d0ac8655f65912ead9f1a395 /t/t5616-partial-clone.sh
parent898f80736c75878acc02dc55672317fcc0e0a5a6 (diff)
downloadgit-d43a21bdbbaf0bc286df8d8e2e29a3e9caa448e8.zip
git-d43a21bdbbaf0bc286df8d8e2e29a3e9caa448e8.tar.gz
git-d43a21bdbbaf0bc286df8d8e2e29a3e9caa448e8.tar.bz2
upload-pack: propagate return value from object filter config callback
If we encounter an error in parse_filter_object_config(), we'll complain to stderr but won't actually propagate the return value up the stack. This is unlike most of our config callbacks, which return the error to git_config() so it can die (this includes the call just below us to parse_hide_refs_config(), which can also produce errors). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5616-partial-clone.sh')
-rwxr-xr-xt/t5616-partial-clone.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t5616-partial-clone.sh b/t/t5616-partial-clone.sh
index f4d49d8..2ea6620 100755
--- a/t/t5616-partial-clone.sh
+++ b/t/t5616-partial-clone.sh
@@ -251,6 +251,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 \