| 659 | } |
| 660 | |
| 661 | int server_supports_hash(const char *desired, int *feature_supported) |
| 662 | { |
| 663 | size_t offset = 0; |
| 664 | size_t len; |
| 665 | const char *hash; |
| 666 | |
| 667 | hash = next_server_feature_value("object-format", &len, &offset); |
| 668 | if (feature_supported) |
| 669 | *feature_supported = !!hash; |
| 670 | if (!hash) { |
| 671 | hash = hash_algos[GIT_HASH_SHA1_LEGACY].name; |
| 672 | len = strlen(hash); |
| 673 | } |
| 674 | while (hash) { |
| 675 | if (!xstrncmpz(desired, hash, len)) |
| 676 | return 1; |
| 677 | |
| 678 | hash = next_server_feature_value("object-format", &len, &offset); |
| 679 | } |
| 680 | return 0; |
| 681 | } |
| 682 | |
| 683 | int parse_feature_request(const char *feature_list, const char *feature) |
| 684 | { |
no test coverage detected