]> git.ipfire.org Git - thirdparty/git.git/commitdiff
object-file: remove declaration for `for_each_file_in_obj_subdir()`
authorPatrick Steinhardt <ps@pks.im>
Thu, 17 Jul 2025 04:56:38 +0000 (06:56 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Jul 2025 05:16:16 +0000 (22:16 -0700)
The function `for_each_file_in_obj_subdir()` is declared in our headers,
but it is not used anywhere else than in the corresponding code file
itself. Drop the declaration and mark the function as file-local.

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

index 5a936f171482fe844aa2e63778f0c132be13deb5..bd93f17dcfe6f6d1fdf911ac5d070713db20a572 100644 (file)
@@ -1318,13 +1318,13 @@ int read_pack_header(int fd, struct pack_header *header)
        return 0;
 }
 
-int for_each_file_in_obj_subdir(unsigned int subdir_nr,
-                               struct strbuf *path,
-                               const struct git_hash_algo *algop,
-                               each_loose_object_fn obj_cb,
-                               each_loose_cruft_fn cruft_cb,
-                               each_loose_subdir_fn subdir_cb,
-                               void *data)
+static int for_each_file_in_obj_subdir(unsigned int subdir_nr,
+                                      struct strbuf *path,
+                                      const struct git_hash_algo *algop,
+                                      each_loose_object_fn obj_cb,
+                                      each_loose_cruft_fn cruft_cb,
+                                      each_loose_subdir_fn subdir_cb,
+                                      void *data)
 {
        size_t origlen, baselen;
        DIR *dir;
index eca323f97362dc1388d8010e3e188c062ad43f5b..d52b335e85ba795f97b9e34977aba9397eec315a 100644 (file)
@@ -86,13 +86,6 @@ typedef int each_loose_cruft_fn(const char *basename,
 typedef int each_loose_subdir_fn(unsigned int nr,
                                 const char *path,
                                 void *data);
-int for_each_file_in_obj_subdir(unsigned int subdir_nr,
-                               struct strbuf *path,
-                               const struct git_hash_algo *algo,
-                               each_loose_object_fn obj_cb,
-                               each_loose_cruft_fn cruft_cb,
-                               each_loose_subdir_fn subdir_cb,
-                               void *data);
 int for_each_loose_file_in_objdir(const char *path,
                                  each_loose_object_fn obj_cb,
                                  each_loose_cruft_fn cruft_cb,