diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2018-03-12 02:27:54 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-14 09:23:50 -0700 |
commit | b383a13cc0dbed752b69d7ad249bc857b9d3607b (patch) | |
tree | ab9434ad4444be32900ba7fa76211124a9f4a4cd /cache.h | |
parent | sha1_file: convert read_sha1_file to struct object_id (diff) | |
download | tgif-b383a13cc0dbed752b69d7ad249bc857b9d3607b.tar.xz |
Convert lookup_replace_object to struct object_id
Convert both the argument and the return value to be pointers to struct
object_id. Update the callers and their internals to deal with the new
type. Remove several temporaries which are no longer needed.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1197,7 +1197,7 @@ static inline void *read_object_file(const struct object_id *oid, enum object_ty * This internal function is only declared here for the benefit of * lookup_replace_object(). Please do not call it directly. */ -extern const unsigned char *do_lookup_replace_object(const unsigned char *sha1); +extern const struct object_id *do_lookup_replace_object(const struct object_id *oid); /* * If object sha1 should be replaced, return the replacement object's @@ -1205,11 +1205,11 @@ extern const unsigned char *do_lookup_replace_object(const unsigned char *sha1); * either sha1 or a pointer to a permanently-allocated value. When * object replacement is suppressed, always return sha1. */ -static inline const unsigned char *lookup_replace_object(const unsigned char *sha1) +static inline const struct object_id *lookup_replace_object(const struct object_id *oid) { if (!check_replace_refs) - return sha1; - return do_lookup_replace_object(sha1); + return oid; + return do_lookup_replace_object(oid); } /* Read and unpack an object file into memory, write memory to an object file */ |