| 24 | } |
| 25 | |
| 26 | int get_oid_hex_algop(const char *hex, struct object_id *oid, |
| 27 | const struct git_hash_algo *algop) |
| 28 | { |
| 29 | int ret = get_hash_hex_algop(hex, oid->hash, algop); |
| 30 | if (!ret) { |
| 31 | oid_set_algo(oid, algop); |
| 32 | if (algop->rawsz != GIT_MAX_RAWSZ) |
| 33 | memset(oid->hash + algop->rawsz, 0, |
| 34 | GIT_MAX_RAWSZ - algop->rawsz); |
| 35 | } |
| 36 | return ret; |
| 37 | } |
| 38 | |
| 39 | /* |
| 40 | * NOTE: This function relies on hash algorithms being in order from shortest |
no test coverage detected