summaryrefslogtreecommitdiff
path: root/sha1-array.h
diff options
context:
space:
mode:
authorMatthew DeVore <matvore@google.com>2019-06-27 22:54:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-06-28 15:41:53 (GMT)
commit9430147ca0aab0189d7e52df97b95a0985fc0c8a (patch)
tree063bbf5b2d710466c1e34bdffcdc2b3a59f5fc71 /sha1-array.h
parent8dca754b1e874719a732bc9ab7b0e14b21b1bc10 (diff)
downloadgit-9430147ca0aab0189d7e52df97b95a0985fc0c8a.zip
git-9430147ca0aab0189d7e52df97b95a0985fc0c8a.tar.gz
git-9430147ca0aab0189d7e52df97b95a0985fc0c8a.tar.bz2
list-objects-filter: encapsulate filter components
Encapsulate filter_fn, filter_free_fn, and filter_data into their own opaque struct. Due to opaqueness, filter_fn and filter_free_fn can no longer be accessed directly by users. Currently, all usages of filter_fn are guarded by a necessary check: (obj->flags & NOT_USER_GIVEN) && filter_fn Take the opportunity to include this check into the new function list_objects_filter__filter_object(), so that we no longer need to write this check at every caller of the filter function. Also, the init functions in list-objects-filter.c no longer need to confusingly return the filter constituents in various places (filter_fn and filter_free_fn as out parameters, and filter_data as the function's return value); they can just initialize the "struct filter" passed in. Helped-by: Jeff Hostetler <git@jeffhostetler.com> Helped-by: Jonathan Tan <jonathantanmy@google.com> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Matthew DeVore <matvore@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1-array.h')
0 files changed, 0 insertions, 0 deletions