aboutsummaryrefslogtreecommitdiff
path: root/object-file.h
diff options
context:
space:
mode:
Diffstat (limited to 'object-file.h')
-rw-r--r--object-file.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/object-file.h b/object-file.h
index 2acf19fb91..5b9641cd89 100644
--- a/object-file.h
+++ b/object-file.h
@@ -137,6 +137,17 @@ int for_each_loose_object(struct object_database *odb,
each_loose_object_fn, void *,
enum odb_for_each_object_flags flags);
+/*
+ * Iterate through all loose objects in the given object database source and
+ * invoke the callback function for each of them. If given, the object info
+ * will be populated with the object's data as if you had called
+ * `odb_source_loose_read_object_info()` on the object.
+ */
+int odb_source_loose_for_each_object(struct odb_source *source,
+ const struct object_info *request,
+ odb_for_each_object_cb cb,
+ void *cb_data,
+ unsigned flags);
/**
* format_object_header() is a thin wrapper around s xsnprintf() that