summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2018-06-11 21:51:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-12 17:46:56 (GMT)
commitcac1137dc4908b03642ee10c45eb687feb9335c1 (patch)
tree8d9376384f99480bcde3a8d6c46f59fea1a00c11 /t
parentc7620bd0f35dddf8b8519da6fbf97014f46d0710 (diff)
downloadgit-cac1137dc4908b03642ee10c45eb687feb9335c1.zip
git-cac1137dc4908b03642ee10c45eb687feb9335c1.tar.gz
git-cac1137dc4908b03642ee10c45eb687feb9335c1.tar.bz2
list-objects: check if filter is NULL before using
In partial_clone_get_default_filter_spec(), the core_partial_clone_filter_default variable may be NULL; ensure that it is not NULL before using it. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t0410-partial-clone.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh
index cc18b75..4984ca5 100755
--- a/t/t0410-partial-clone.sh
+++ b/t/t0410-partial-clone.sh
@@ -23,7 +23,15 @@ promise_and_delete () {
delete_object repo "$HASH"
}
+test_expect_success 'extensions.partialclone without filter' '
+ test_create_repo server &&
+ git clone --filter="blob:none" "file://$(pwd)/server" client &&
+ git -C client config --unset core.partialclonefilter &&
+ git -C client fetch origin
+'
+
test_expect_success 'missing reflog object, but promised by a commit, passes fsck' '
+ rm -rf repo &&
test_create_repo repo &&
test_commit -C repo my_commit &&