| 6 | #include "strbuf.h" |
| 7 | |
| 8 | static int get_hash_hex_algop(const char *hex, unsigned char *hash, |
| 9 | const struct git_hash_algo *algop) |
| 10 | { |
| 11 | for (size_t i = 0; i < algop->rawsz; i++) { |
| 12 | int val = hex2chr(hex); |
| 13 | if (val < 0) |
| 14 | return -1; |
| 15 | *hash++ = val; |
| 16 | hex += 2; |
| 17 | } |
| 18 | return 0; |
| 19 | } |
| 20 | |
| 21 | int get_hash_hex(const char *hex, unsigned char *sha1) |
| 22 | { |
no test coverage detected