]> git.ipfire.org Git - thirdparty/git.git/blobdiff - refs.c
refs: introduce `refs_for_each_include_root_refs()`
[thirdparty/git.git] / refs.c
diff --git a/refs.c b/refs.c
index 3546d9083179c7d6965ee6ddee6f9f3c8d81dd0d..7d58fe1e09a431744a8808159f806701d6d1c130 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -1765,6 +1765,13 @@ int for_each_rawref(each_ref_fn fn, void *cb_data)
        return refs_for_each_rawref(get_main_ref_store(the_repository), fn, cb_data);
 }
 
+int refs_for_each_include_root_refs(struct ref_store *refs, each_ref_fn fn,
+                                   void *cb_data)
+{
+       return do_for_each_ref(refs, "", NULL, fn, 0,
+                              DO_FOR_EACH_INCLUDE_ROOT_REFS, cb_data);
+}
+
 static int qsort_strcmp(const void *va, const void *vb)
 {
        const char *a = *(const char **)va;