MCPcopy Create free account
hub / github.com/git/git / new

Method new

src/loose.rs:67–74  ·  view source on GitHub ↗

Create a new `ObjectMemoryMap`. The storage and compatibility `HashAlgorithm` instances are used to store the object IDs in the correct map.

(storage: HashAlgorithm, compat: HashAlgorithm)

Source from the content-addressed store, hash-verified

65 /// The storage and compatibility `HashAlgorithm` instances are used to store the object IDs in
66 /// the correct map.
67 fn new(storage: HashAlgorithm, compat: HashAlgorithm) -> Self {
68 Self {
69 to_compat: BTreeMap::new(),
70 to_storage: BTreeMap::new(),
71 compat,
72 storage,
73 }
74 }
75
76 fn len(&self) -> usize {
77 self.to_compat.len()

Callers

nothing calls this directly

Calls 7

lenMethod · 0.80
raw_lenMethod · 0.80
insertMethod · 0.80
empty_treeMethod · 0.80
empty_blobMethod · 0.80
null_oidMethod · 0.80
cloneMethod · 0.80

Tested by

no test coverage detected