mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
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
4
http.c
4
http.c
@@ -2662,7 +2662,7 @@ struct http_object_request *new_http_object_request(const char *base_url,
|
||||
oidcpy(&freq->oid, oid);
|
||||
freq->localfile = -1;
|
||||
|
||||
loose_object_path(the_repository, &filename, oid);
|
||||
odb_loose_path(the_repository->objects->odb, &filename, oid);
|
||||
strbuf_addf(&freq->tmpfile, "%s.temp", filename.buf);
|
||||
|
||||
strbuf_addf(&prevfile, "%s.prev", filename.buf);
|
||||
@@ -2814,7 +2814,7 @@ int finish_http_object_request(struct http_object_request *freq)
|
||||
unlink_or_warn(freq->tmpfile.buf);
|
||||
return -1;
|
||||
}
|
||||
loose_object_path(the_repository, &filename, &freq->oid);
|
||||
odb_loose_path(the_repository->objects->odb, &filename, &freq->oid);
|
||||
freq->rename = finalize_object_file(freq->tmpfile.buf, filename.buf);
|
||||
strbuf_release(&filename);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user