diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-02-04 23:48:28 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-26 01:16:31 (GMT) |
commit | cdcaaec9a6028f53f9b44efb6dce9f15bb394b45 (patch) | |
tree | 2b82841b7c65aadfd9a682cd2c73b9758c8fbd75 /cache.h | |
parent | 73182b2d84e3348ab87ef5ecbe3315881381c29c (diff) | |
download | git-cdcaaec9a6028f53f9b44efb6dce9f15bb394b45.zip git-cdcaaec9a6028f53f9b44efb6dce9f15bb394b45.tar.gz git-cdcaaec9a6028f53f9b44efb6dce9f15bb394b45.tar.bz2 |
object API docs: move check_object_signature() docs to cache.h
Move the API documentation for check_object_signature() to cache.h,
where its prototype is declared. This is in preparation for adding a
companion function.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1319,6 +1319,12 @@ enum unpack_loose_header_result unpack_loose_header(git_zstream *stream, struct object_info; int parse_loose_header(const char *hdr, struct object_info *oi); +/** + * With in-core object data in "buf", rehash it to make sure the + * object name actually matches "oid" to detect object corruption. + * With "buf" == NULL, try reading the object named with "oid" using + * the streaming interface and rehash it to do the same. + */ int check_object_signature(struct repository *r, const struct object_id *oid, void *buf, unsigned long size, const char *type, struct object_id *real_oidp); |