MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / git_oid_hex

Function git_oid_hex

atomic-repository/src/repository/project_tree.rs:1541–1549  ·  view source on GitHub ↗
(oid: &GitObjectId)

Source from the content-addressed store, hash-verified

1539}
1540
1541pub(super) fn git_oid_hex(oid: &GitObjectId) -> Vec<u8> {
1542 const HEX: &[u8; 16] = b"0123456789abcdef";
1543 let mut output = Vec::with_capacity(oid.as_bytes().len() * 2);
1544 for byte in oid.as_bytes() {
1545 output.push(HEX[usize::from(byte >> 4)]);
1546 output.push(HEX[usize::from(byte & 0x0f)]);
1547 }
1548 output
1549}
1550
1551fn parse_gitlink_bytes(
1552 algorithm: GitHashAlgorithm,

Callers 2

newMethod · 0.70
parse_treeMethod · 0.70

Calls 3

lenMethod · 0.45
as_bytesMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected