summaryrefslogtreecommitdiff
path: root/object-file.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-04-29 09:52:16 +0200
committerJunio C Hamano <gitster@pobox.com>2025-04-29 10:08:12 -0700
commit56ef85e82ffa39ac86db39bc0ac11c67451d0e5b (patch)
tree2b6874b1aaeace33a53e1bedf5f4f55c5cd09859 /object-file.c
parentddb28da58fd657fa672f4605e50e140ce4c662f8 (diff)
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 <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-file.c')
-rw-r--r--object-file.c4
1 files changed, 2 insertions, 2 deletions
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);