diff options
Diffstat (limited to 'packfile.h')
| -rw-r--r-- | packfile.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/packfile.h b/packfile.h index acc5c55ad5..1a1b720764 100644 --- a/packfile.h +++ b/packfile.h @@ -339,9 +339,22 @@ typedef int each_packed_object_fn(const struct object_id *oid, void *data); int for_each_object_in_pack(struct packed_git *p, each_packed_object_fn, void *data, - enum for_each_object_flags flags); -int for_each_packed_object(struct repository *repo, each_packed_object_fn cb, - void *data, enum for_each_object_flags flags); + unsigned flags); + +/* + * Iterate through all packed objects in the given packfile store and invoke + * the callback function for each of them. If an object info request is given, + * then the object info will be read for every individual object and passed to + * the callback as if `packfile_store_read_object_info()` was called for the + * object. + * + * The flags parameter is a combination of `odb_for_each_object_flags`. + */ +int packfile_store_for_each_object(struct packfile_store *store, + const struct object_info *request, + odb_for_each_object_cb cb, + void *cb_data, + unsigned flags); /* A hook to report invalid files in pack directory */ #define PACKDIR_FILE_PACK 1 |
