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

Function oid

atomic-repository/src/repository/project_tree.rs:1737–1743  ·  view source on GitHub ↗
(algorithm: GitHashAlgorithm, byte: u8)

Source from the content-addressed store, hash-verified

1735 use super::*;
1736
1737 fn oid(algorithm: GitHashAlgorithm, byte: u8) -> GitObjectId {
1738 let length = match algorithm {
1739 GitHashAlgorithm::Sha1 => 20,
1740 GitHashAlgorithm::Sha256 => 32,
1741 };
1742 GitObjectId::new(algorithm, vec![byte; length]).unwrap()
1743 }
1744
1745 #[test]
1746 fn repo_path_is_raw_versioned_and_canonical() {

Callers 3

entryFunction · 0.70
crash_span_entryFunction · 0.70

Calls 1

unwrapMethod · 0.45