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

Function oid_hex

atomic-cli/src/commands/git/hooks.rs:1428–1436  ·  view source on GitHub ↗

Lowercase hex for a tagged Git object ID (display only).

(bytes: &[u8])

Source from the content-addressed store, hash-verified

1426
1427/// Lowercase hex for a tagged Git object ID (display only).
1428fn oid_hex(bytes: &[u8]) -> String {
1429 const HEX: &[u8; 16] = b"0123456789abcdef";
1430 let mut out = String::with_capacity(bytes.len() * 2);
1431 for byte in bytes {
1432 out.push(HEX[(byte >> 4) as usize] as char);
1433 out.push(HEX[(byte & 0x0f) as usize] as char);
1434 }
1435 out
1436}
1437
1438fn persist_checkout_event(
1439 root: &Path,

Callers

nothing calls this directly

Calls 2

lenMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected