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

Function git_oid_hex

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

Source from the content-addressed store, hash-verified

1557}
1558
1559pub(super) fn git_oid_hex(oid: &GitObjectId) -> Vec<u8> {
1560 const HEX: &[u8; 16] = b"0123456789abcdef";
1561 let mut output = Vec::with_capacity(oid.as_bytes().len() * 2);
1562 for byte in oid.as_bytes() {
1563 output.push(HEX[usize::from(byte >> 4)]);
1564 output.push(HEX[usize::from(byte & 0x0f)]);
1565 }
1566 output
1567}
1568
1569fn parse_gitlink_bytes(
1570 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