]> git.ipfire.org Git - thirdparty/git.git/commitdiff
refs: remove unused `refs_for_each_include_root_ref()`
authorPatrick Steinhardt <ps@pks.im>
Mon, 23 Feb 2026 11:59:35 +0000 (12:59 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Feb 2026 21:21:17 +0000 (13:21 -0800)
Remove the unused `refs_for_each_include_root_ref()` function.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c
refs.h

diff --git a/refs.c b/refs.c
index 600913b99f3f88390829bac02eb3d87e92bb5e93..466398494f7e9c58714852b25c77010cce30aa67 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -1932,13 +1932,6 @@ int refs_for_each_rawref_in(struct ref_store *refs, const char *prefix,
                               DO_FOR_EACH_INCLUDE_BROKEN, 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;
diff --git a/refs.h b/refs.h
index f16b1b697b2bf8e8618fa621bd3ae5b11c175b23..1fdb809343a3f45cbb73a0765dbea28ec06dc757 100644 (file)
--- a/refs.h
+++ b/refs.h
@@ -471,12 +471,6 @@ int refs_for_each_rawref(struct ref_store *refs, each_ref_fn fn, void *cb_data);
 int refs_for_each_rawref_in(struct ref_store *refs, const char *prefix,
                            each_ref_fn fn, void *cb_data);
 
-/*
- * Iterates over all refs including root refs, i.e. pseudorefs and HEAD.
- */
-int refs_for_each_include_root_refs(struct ref_store *refs, each_ref_fn fn,
-                                   void *cb_data);
-
 /*
  * Normalizes partial refs to their fully qualified form.
  * Will prepend <prefix> to the <pattern> if it doesn't start with 'refs/'.