* NOTE: This function relies on hash algorithms being in order from shortest * length to longest length. */
| 41 | * length to longest length. |
| 42 | */ |
| 43 | int get_oid_hex_any(const char *hex, struct object_id *oid) |
| 44 | { |
| 45 | int i; |
| 46 | for (i = GIT_HASH_NALGOS - 1; i > 0; i--) { |
| 47 | if (!get_oid_hex_algop(hex, oid, &hash_algos[i])) |
| 48 | return i; |
| 49 | } |
| 50 | return GIT_HASH_UNKNOWN; |
| 51 | } |
| 52 | |
| 53 | int get_oid_hex(const char *hex, struct object_id *oid) |
| 54 | { |
no test coverage detected