MCPcopy Create free account
hub / github.com/HairlessVillager/minecommit / get

Method get

minecommit/src/odb/git.rs:162–174  ·  view source on GitHub ↗
(&self, key: &str)

Source from the content-addressed store, hash-verified

160
161impl OdbReader for LocalGitOdb {
162 fn get(&self, key: &str) -> Result<Vec<u8>> {
163 let oid = self
164 .path_to_oid
165 .get(key)
166 .with_context(|| format!("key not found: {key}"))?;
167 Ok(self
168 .repo
169 .to_thread_local()
170 .find_blob(*oid)
171 .with_context(|| format!("failed to find blob for key: {key}"))?
172 .data
173 .to_vec())
174 }
175
176 fn get_par(&self, keys: &[&str]) -> Result<Vec<Vec<u8>>> {
177 let repo = self.repo.clone();

Callers 3

build_path_to_oidFunction · 0.45
get_parMethod · 0.45

Calls

no outgoing calls

Tested by 1