MCPcopy Index your code
hub / github.com/git/git / read_pack_header

Function read_pack_header

object-file.c:1442–1455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1440}
1441
1442int read_pack_header(int fd, struct pack_header *header)
1443{
1444 if (read_in_full(fd, header, sizeof(*header)) != sizeof(*header))
1445 /* "eof before pack header was fully read" */
1446 return PH_ERROR_EOF;
1447
1448 if (header->hdr_signature != htonl(PACK_SIGNATURE))
1449 /* "protocol error (pack signature mismatch detected)" */
1450 return PH_ERROR_PACK_SIGNATURE;
1451 if (!pack_version_ok(header->hdr_version))
1452 /* "protocol error (pack version unsupported)" */
1453 return PH_ERROR_PROTOCOL;
1454 return 0;
1455}
1456
1457int for_each_file_in_obj_subdir(unsigned int subdir_nr,
1458 struct strbuf *path,

Callers 2

get_packFunction · 0.85
parse_pack_headerFunction · 0.85

Calls 1

read_in_fullFunction · 0.85

Tested by

no test coverage detected