object-file: remove declaration for `for_each_file_in_obj_subdir()`
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>
Patrick Steinhardt committed
Jul 17, 2025 at 06:56 UTC
83439299f1326c7471f5c7595c96d14b65a71879
2 files changed
+7
-14
object-file.c
+7
-7
@@ -1318,13 +1318,13 @@ int read_pack_header(int fd, struct pack_header *header)
1318
return 0;
1319
}
1320
1321
-int for_each_file_in_obj_subdir(unsigned int subdir_nr,
1322
- struct strbuf *path,
1323
- const struct git_hash_algo *algop,
1324
- each_loose_object_fn obj_cb,
1325
- each_loose_cruft_fn cruft_cb,
1326
- each_loose_subdir_fn subdir_cb,
1327
- void *data)
1321
+static int for_each_file_in_obj_subdir(unsigned int subdir_nr,
1322
+ struct strbuf *path,
1323
+ const struct git_hash_algo *algop,
1324
+ each_loose_object_fn obj_cb,
1325
+ each_loose_cruft_fn cruft_cb,
1326
+ each_loose_subdir_fn subdir_cb,
1327
+ void *data)
1328
{
1329
size_t origlen, baselen;
1330
DIR *dir;
object-file.h
-7
@@ -86,13 +86,6 @@ typedef int each_loose_cruft_fn(const char *basename,
86
typedef int each_loose_subdir_fn(unsigned int nr,
87
const char *path,
88
void *data);
89
-int for_each_file_in_obj_subdir(unsigned int subdir_nr,
90
- struct strbuf *path,
91
- const struct git_hash_algo *algo,
92
- each_loose_object_fn obj_cb,
93
- each_loose_cruft_fn cruft_cb,
94
- each_loose_subdir_fn subdir_cb,
95
- void *data);
89
int for_each_loose_file_in_objdir(const char *path,
90
each_loose_object_fn obj_cb,
91
each_loose_cruft_fn cruft_cb,