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

Method put

minecommit/src/odb/git.rs:207–217  ·  view source on GitHub ↗
(&mut self, key: &str, value: impl AsRef<[u8]>)

Source from the content-addressed store, hash-verified

205
206impl OdbWriter for LocalGitOdb {
207 fn put(&mut self, key: &str, value: impl AsRef<[u8]>) -> Result<()> {
208 let sha1 = self
209 .repo
210 .to_thread_local()
211 .write_blob(value)
212 .with_context(|| format!("failed to write blob for key: {key}"))?
213 .to_hex()
214 .to_string();
215 self.pending.insert(key.to_string(), sha1);
216 Ok(())
217 }
218
219 fn put_par(
220 &mut self,

Callers 3

git_glob_after_commitFunction · 0.45
git_commit_with_parentFunction · 0.45

Calls

no outgoing calls

Tested by 3

git_glob_after_commitFunction · 0.36
git_commit_with_parentFunction · 0.36