Skip to main content

encode_git_oid

Function encode_git_oid 

Source
pub fn encode_git_oid(hex_oid: &str) -> Result<String>
Expand description

Encode a git OID (hex string) as a git-raw CIDv1. The algorithm is inferred from the hex length: 40 chars → sha1, 64 chars → sha2-256.