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

Function parse_capability

bundle.c:47–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47static int parse_capability(struct bundle_header *header, const char *capability)
48{
49 const char *arg;
50 if (skip_prefix(capability, "object-format=", &arg)) {
51 int algo = hash_algo_by_name(arg);
52 if (algo == GIT_HASH_UNKNOWN)
53 return error(_("unrecognized bundle hash algorithm: %s"), arg);
54 header->hash_algo = &hash_algos[algo];
55 return 0;
56 }
57 if (skip_prefix(capability, "filter=", &arg)) {
58 parse_list_objects_filter(&header->filter, arg);
59 return 0;
60 }
61 return error(_("unknown capability '%s'"), capability);
62}
63
64static int parse_bundle_signature(struct bundle_header *header, const char *line)
65{

Callers 1

read_bundle_header_fdFunction · 0.70

Calls 3

hash_algo_by_nameFunction · 0.85
errorFunction · 0.85

Tested by

no test coverage detected