aboutsummaryrefslogtreecommitdiffstats
path: root/object-file.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-11-23 19:59:44 +0100
committerJunio C Hamano <gitster@pobox.com>2025-11-23 12:56:46 -0800
commit7b940286527ec2175dffbb317f47e080bb37cf3e (patch)
tree2d5b17c348d3f01a3b35bf3e2e33943586b1c39e /object-file.c
parent1599b68d5e960a12f5ac624f81c70ece317db5a6 (diff)
downloadgit-7b940286527ec2175dffbb317f47e080bb37cf3e.tar.gz
streaming: drop redundant type and size pointers
In the preceding commits we have turned `struct odb_read_stream` into a publicly visible structure. Furthermore, this structure now contains the type and size of the object that we are about to stream. Consequently, the out-pointers that we used before to propagate the type and size of the streamed object are now somewhat redundant with the data contained in the structure itself. Drop these out-pointers and adapt callers accordingly. 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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/object-file.c b/object-file.c
index 9601fdb12d..12177a7dd7 100644
--- a/object-file.c
+++ b/object-file.c
@@ -132,19 +132,17 @@ int check_object_signature(struct repository *r, const struct object_id *oid,
int stream_object_signature(struct repository *r, const struct object_id *oid)
{
struct object_id real_oid;
- unsigned long size;
- enum object_type obj_type;
struct odb_read_stream *st;
struct git_hash_ctx c;
char hdr[MAX_HEADER_LEN];
int hdrlen;
- st = odb_read_stream_open(r->objects, oid, &obj_type, &size, NULL);
+ st = odb_read_stream_open(r->objects, oid, NULL);
if (!st)
return -1;
/* Generate the header */
- hdrlen = format_object_header(hdr, sizeof(hdr), obj_type, size);
+ hdrlen = format_object_header(hdr, sizeof(hdr), st->type, st->size);
/* Sha1.. */
r->hash_algo->init_fn(&c);