MCPcopy Create free account
hub / github.com/git/git / parse_pack_header_option

Function parse_pack_header_option

packfile.c:2801–2819  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2799}
2800
2801int parse_pack_header_option(const char *in, unsigned char *out, unsigned int *len)
2802{
2803 unsigned char *hdr;
2804 char *c;
2805
2806 hdr = out;
2807 put_be32(hdr, PACK_SIGNATURE);
2808 hdr += 4;
2809 put_be32(hdr, strtoul(in, &c, 10));
2810 hdr += 4;
2811 if (*c != ',')
2812 return -1;
2813 put_be32(hdr, strtoul(c + 1, &c, 10));
2814 hdr += 4;
2815 if (*c)
2816 return -1;
2817 *len = hdr - out;
2818 return 0;
2819}
2820
2821struct packfile_store *packfile_store_new(struct odb_source *source)
2822{

Callers 2

cmd_index_packFunction · 0.85
cmd_unpack_objectsFunction · 0.85

Calls 1

put_be32Function · 0.85

Tested by

no test coverage detected