Skip to content

Commit cdcaaec

Browse files
avargitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 73182b2 commit cdcaaec

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cache.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,6 +1319,12 @@ enum unpack_loose_header_result unpack_loose_header(git_zstream *stream,
13191319
struct object_info;
13201320
int parse_loose_header(const char *hdr, struct object_info *oi);
13211321

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+
*/
13221328
int check_object_signature(struct repository *r, const struct object_id *oid,
13231329
void *buf, unsigned long size, const char *type,
13241330
struct object_id *real_oidp);

object-file.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,12 +1066,6 @@ int format_object_header(char *str, size_t size, enum object_type type,
10661066
return format_object_header_literally(str, size, name, objsize);
10671067
}
10681068

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-
*/
10751069
int check_object_signature(struct repository *r, const struct object_id *oid,
10761070
void *buf, unsigned long size, const char *type,
10771071
struct object_id *real_oidp)

0 commit comments

Comments
 (0)