summaryrefslogtreecommitdiff
path: root/src/iterator.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/iterator.h')
-rw-r--r--src/iterator.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/iterator.h b/src/iterator.h
index 57f82416a..893e5db50 100644
--- a/src/iterator.h
+++ b/src/iterator.h
@@ -294,4 +294,19 @@ extern int git_iterator_advance_over_with_status(
*/
extern int git_iterator_index(git_index **out, git_iterator *iter);
+typedef int (*git_iterator_walk_cb)(
+ const git_index_entry **entries,
+ void *data);
+
+/**
+ * Walk the given iterators in lock-step. The given callback will be
+ * called for each unique path, with the index entry in each iterator
+ * (or NULL if the given iterator does not contain that path).
+ */
+extern int git_iterator_walk(
+ git_iterator **iterators,
+ size_t cnt,
+ git_iterator_walk_cb cb,
+ void *data);
+
#endif