refs.c: migrate internal ref iteration to pass thru repository argument
[gitweb.git] / refs.h
diff --git a/refs.h b/refs.h
index cc2fb4c68c0e194dc51e3846192911c2c6949c6b..80eec8bbc68e378d6b8424100fce798ba233f8ca 100644 (file)
--- a/refs.h
+++ b/refs.h
@@ -274,6 +274,16 @@ struct ref_transaction;
 typedef int each_ref_fn(const char *refname,
                        const struct object_id *oid, int flags, void *cb_data);
 
+/*
+ * The same as each_ref_fn, but also with a repository argument that
+ * contains the repository associated with the callback.
+ */
+typedef int each_repo_ref_fn(struct repository *r,
+                            const char *refname,
+                            const struct object_id *oid,
+                            int flags,
+                            void *cb_data);
+
 /*
  * The following functions invoke the specified callback function for
  * each reference indicated.  If the function ever returns a nonzero