]> git.ipfire.org Git - thirdparty/git.git/commitdiff
object API docs: move check_object_signature() docs to cache.h
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 4 Feb 2022 23:48:28 +0000 (00:48 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 26 Feb 2022 01:16:31 +0000 (17:16 -0800)
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>
cache.h
object-file.c

diff --git a/cache.h b/cache.h
index 281f00ab1b161dc71d0bcdae91222e9429ba0342..98d1ef085794b726be56b9eb63ecd70c4f062956 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -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);
index 271acf4dd1573538edf163fa2b312fbd8cdd9e72..44e0b32d71ad51625056f551bc27e6ed8c6928a8 100644 (file)
@@ -1066,12 +1066,6 @@ int format_object_header(char *str, size_t size, enum object_type type,
        return format_object_header_literally(str, size, name, objsize);
 }
 
-/*
- * 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)