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>
Ævar Arnfjörð Bjarmason committed
Feb 5, 2022 at 00:48 UTC
cdcaaec9a6028f53f9b44efb6dce9f15bb394b45
2 files changed
+6
-6
cache.h
+6
@@ -1319,6 +1319,12 @@ enum unpack_loose_header_result unpack_loose_header(git_zstream *stream,
1319
struct object_info;
1320
int parse_loose_header(const char *hdr, struct object_info *oi);
1321
1322
+/**
1323
+ * With in-core object data in "buf", rehash it to make sure the
1324
+ * object name actually matches "oid" to detect object corruption.
1325
+ * With "buf" == NULL, try reading the object named with "oid" using
1326
+ * the streaming interface and rehash it to do the same.
1327
+ */
1328
int check_object_signature(struct repository *r, const struct object_id *oid,
1329
void *buf, unsigned long size, const char *type,
1330
struct object_id *real_oidp);
object-file.c
-6
@@ -1066,12 +1066,6 @@ int format_object_header(char *str, size_t size, enum object_type type,
1066
return format_object_header_literally(str, size, name, objsize);
1067
}
1068
1069
-/*
1070
- * With in-core object data in "buf", rehash it to make sure the
1071
- * object name actually matches "oid" to detect object corruption.
1072
- * With "buf" == NULL, try reading the object named with "oid" using
1073
- * the streaming interface and rehash it to do the same.
1074
- */
1069
int check_object_signature(struct repository *r, const struct object_id *oid,
1070
void *buf, unsigned long size, const char *type,
1071
struct object_id *real_oidp)