aboutsummaryrefslogtreecommitdiff
path: root/list-objects-filter.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-05-13 12:19:18 -0700
committerJunio C Hamano <gitster@pobox.com>2020-05-13 12:19:18 -0700
commit69ae8ffa2a011384d317891c256aa6d381b003cd (patch)
treec4101cb13ec5dc8db83cb49cdb058e81e4af2c57 /list-objects-filter.c
parent896833b2687ce09a4965e5b4f3992daad096a65b (diff)
parent9639474b6dd126bae29dba70e2fbe11169d60e20 (diff)
downloadgit-69ae8ffa2a011384d317891c256aa6d381b003cd.tar.xz
Merge branch 'tb/bitmap-walk-with-tree-zero-filter'
The object walk with object filter "--filter=tree:0" can now take advantage of the pack bitmap when available. * tb/bitmap-walk-with-tree-zero-filter: pack-bitmap: pass object filter to fill-in traversal pack-bitmap.c: support 'tree:0' filtering pack-bitmap.c: make object filtering functions generic list-objects-filter: treat NULL filter_options as "disabled"
Diffstat (limited to 'list-objects-filter.c')
-rw-r--r--list-objects-filter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/list-objects-filter.c b/list-objects-filter.c
index 1e8d4e763d..0a3ef3cab3 100644
--- a/list-objects-filter.c
+++ b/list-objects-filter.c
@@ -663,6 +663,9 @@ struct filter *list_objects_filter__init(
assert((sizeof(s_filters) / sizeof(s_filters[0])) == LOFC__COUNT);
+ if (!filter_options)
+ return NULL;
+
if (filter_options->choice >= LOFC__COUNT)
BUG("invalid list-objects filter choice: %d",
filter_options->choice);