mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
![Jeff Hostetler](/assets/img/avatar_default.png)
Create traverse_commit_list_filtered() and add filtering interface to allow certain objects to be omitted from the traversal. Update traverse_commit_list() to be a wrapper for the above with a null filter to minimize the number of callers that needed to be changed. Object filtering will be used in a future commit by rev-list and pack-objects for partial clone and fetch to omit unwanted objects from the result. traverse_bitmap_commit_list() does not work with filtering. If a packfile bitmap is present, it will not be used. It should be possible to extend such support in the future (at least to simple filters that do not require object pathnames), but that is beyond the scope of this patch series. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Reviewed-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
23 lines
670 B
C
23 lines
670 B
C
#ifndef LIST_OBJECTS_H
|
|
#define LIST_OBJECTS_H
|
|
|
|
typedef void (*show_commit_fn)(struct commit *, void *);
|
|
typedef void (*show_object_fn)(struct object *, const char *, void *);
|
|
void traverse_commit_list(struct rev_info *, show_commit_fn, show_object_fn, void *);
|
|
|
|
typedef void (*show_edge_fn)(struct commit *);
|
|
void mark_edges_uninteresting(struct rev_info *, show_edge_fn);
|
|
|
|
struct oidset;
|
|
struct list_objects_filter_options;
|
|
|
|
void traverse_commit_list_filtered(
|
|
struct list_objects_filter_options *filter_options,
|
|
struct rev_info *revs,
|
|
show_commit_fn show_commit,
|
|
show_object_fn show_object,
|
|
void *show_data,
|
|
struct oidset *omitted);
|
|
|
|
#endif /* LIST_OBJECTS_H */
|