From 56ef85e82ffa39ac86db39bc0ac11c67451d0e5b Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Tue, 29 Apr 2025 09:52:16 +0200 Subject: object-store: drop `loose_object_path()` The function `loose_object_path()` is a trivial wrapper around `odb_loose_path()`, with the only exception that it always uses the primary object database of the given repository. This doesn't really add a ton of value though, so let's drop the function and inline it at every callsite. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- object-file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'object-file.c') diff --git a/object-file.c b/object-file.c index 9cc3a24a40..dc56a4766d 100644 --- a/object-file.c +++ b/object-file.c @@ -932,7 +932,7 @@ static int write_loose_object(const struct object_id *oid, char *hdr, if (batch_fsync_enabled(FSYNC_COMPONENT_LOOSE_OBJECT)) prepare_loose_object_bulk_checkin(); - loose_object_path(the_repository, &filename, oid); + odb_loose_path(the_repository->objects->odb, &filename, oid); fd = start_loose_object_common(&tmp_file, filename.buf, flags, &stream, compressed, sizeof(compressed), @@ -1079,7 +1079,7 @@ int stream_loose_object(struct input_stream *in_stream, size_t len, goto cleanup; } - loose_object_path(the_repository, &filename, oid); + odb_loose_path(the_repository->objects->odb, &filename, oid); /* We finally know the object path, and create the missing dir. */ dirlen = directory_size(filename.buf); -- cgit v1.2.3