aboutsummaryrefslogtreecommitdiffstats
path: root/object-file.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-07-17 06:56:28 +0200
committerJunio C Hamano <gitster@pobox.com>2025-07-16 22:16:13 -0700
commit18323f5b485f5c484622e18c6bfd167fdf5ca101 (patch)
tree590e5d3fae4951410c37fe89afbf50480e8ec25d /object-file.h
parentobject-file: fix -Wsign-compare warnings (diff)
downloadgit-18323f5b485f5c484622e18c6bfd167fdf5ca101.tar.gz
git-18323f5b485f5c484622e18c6bfd167fdf5ca101.zip
object-file: stop using `the_hash_algo`
There are a couple of users of the `the_hash_algo` macro, which implicitly depends on `the_repository`. Adapt these callers to not do so anymore, either by deriving it from already-available context or by using `the_repository->hash_algo`. The latter variant doesn't yet help to remove the global dependency, but such users will be adapted in the following commits to not use `the_repository` anymore. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-file.h')
-rw-r--r--object-file.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/object-file.h b/object-file.h
index 67b4ffc480..222ff2871a 100644
--- a/object-file.h
+++ b/object-file.h
@@ -89,6 +89,7 @@ typedef int each_loose_subdir_fn(unsigned int nr,
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,