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>
This commit is contained in:
committed by
Junio C Hamano
parent
ddb28da58f
commit
56ef85e82f
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user