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

Function is_full_oid

atomic-cli/src/commands/git/parallel.rs:1083–1085  ·  view source on GitHub ↗

Whether `value` is a full-length, all-hex Git object ID (40 or 64 chars).

(value: &str)

Source from the content-addressed store, hash-verified

1081
1082/// Whether `value` is a full-length, all-hex Git object ID (40 or 64 chars).
1083pub(crate) fn is_full_oid(value: &str) -> bool {
1084 matches!(value.len(), 40 | 64) && value.bytes().all(|byte| byte.is_ascii_hexdigit())
1085}
1086
1087/// The complete lowercase-hex Git ancestry of `sha` (the commit itself and
1088/// every transitive parent), walked on the live object database. Used by the

Callers 1

Calls 2

allMethod · 0.45
bytesMethod · 0.45

Tested by

no test coverage detected