| 45 | } |
| 46 | |
| 47 | static 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 | |
| 64 | static int parse_bundle_signature(struct bundle_header *header, const char *line) |
| 65 | { |
no test coverage detected