diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-25T23·06+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-25T23·06+0100 |
commit | 93ba78d6f4632ef1c5228965e3edc8c0faf88c1e (patch) | |
tree | 85730c182a9f5f492ade8e8ccdb1c2356f9900bd /third_party/git/list-objects-filter.h | |
parent | 6f8fbf4aa4b1654ab27d4829e114538761817de0 (diff) |
revert(3p/git): Revert merge of git upstream at v2.26.2 r/852
This causes cgit to serve error pages, which is undesirable. This reverts commit 5229c9b232de5bfa959ad6ebbb4c8192ac513352, reversing changes made to f2b211131f2347342dde63975b09cf603149f1a3.
Diffstat (limited to 'third_party/git/list-objects-filter.h')
-rw-r--r-- | third_party/git/list-objects-filter.h | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/third_party/git/list-objects-filter.h b/third_party/git/list-objects-filter.h index cfd784e203f3..1d45a4ad5786 100644 --- a/third_party/git/list-objects-filter.h +++ b/third_party/git/list-objects-filter.h @@ -60,36 +60,30 @@ enum list_objects_filter_situation { LOFS_BLOB }; -struct filter; - -/* - * Constructor for the set of defined list-objects filters. - * The `omitted` set is optional. It is populated with objects that the - * filter excludes. This set should not be considered finalized until - * after list_objects_filter__free is called on the returned `struct - * filter *`. - */ -struct filter *list_objects_filter__init( - struct oidset *omitted, - struct list_objects_filter_options *filter_options); - -/* - * Lets `filter` decide how to handle the `obj`. If `filter` is NULL, this - * function behaves as expected if no filter is configured: all objects are - * included. - */ -enum list_objects_filter_result list_objects_filter__filter_object( +typedef enum list_objects_filter_result (*filter_object_fn)( struct repository *r, enum list_objects_filter_situation filter_situation, struct object *obj, const char *pathname, const char *filename, - struct filter *filter); + void *filter_data); + +typedef void (*filter_free_fn)(void *filter_data); /* - * Destroys `filter` and finalizes the `omitted` set, if present. Does - * nothing if `filter` is null. + * Constructor for the set of defined list-objects filters. + * Returns a generic "void *filter_data". + * + * The returned "filter_fn" will be used by traverse_commit_list() + * to filter the results. + * + * The returned "filter_free_fn" is a destructor for the + * filter_data. */ -void list_objects_filter__free(struct filter *filter); +void *list_objects_filter__init( + struct oidset *omitted, + struct list_objects_filter_options *filter_options, + filter_object_fn *filter_fn, + filter_free_fn *filter_free_fn); #endif /* LIST_OBJECTS_FILTER_H */ |