diff options
author | Jeff King <peff@peff.net> | 2020-02-24 07:36:56 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-02-24 23:55:53 +0300 |
commit | b99b6bcc57faf5c989fc18c3b8d4d92df3407cec (patch) | |
tree | 1cc189885d98924650c5610c8e846e9b23ab45bc /object-store.h | |
parent | 63f4a7fc0107ec240f48605a4d4f8e41b91caa41 (diff) |
packed_object_info(): use object_id for returning delta base
If a caller sets the object_info.delta_base_sha1 to a non-NULL pointer,
we'll write the oid of the object's delta base to it. But we can
increase our type safety by switching this to a real object_id struct.
All of our callers are just pointing into the hash member of an
object_id anyway, so there's no inconvenience.
Note that we do still keep it as a pointer-to-struct, because the NULL
sentinel value tells us whether the caller is even interested in the
information.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-store.h')
-rw-r--r-- | object-store.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/object-store.h b/object-store.h index 5b047637e3..be72fee7d5 100644 --- a/object-store.h +++ b/object-store.h @@ -300,7 +300,7 @@ struct object_info { enum object_type *typep; unsigned long *sizep; off_t *disk_sizep; - unsigned char *delta_base_sha1; + struct object_id *delta_base_oid; struct strbuf *type_name; void **contentp; |