MCPcopy Create free account
hub / github.com/emwalker/digraph / add

Method add

backend/src/git/core/mod.rs:365–370  ·  view source on GitHub ↗
(&mut self, repo_id: RepoId, filename: &Path, oid: &Option<git2::Oid>)

Source from the content-addressed store, hash-verified

363 }
364
365 pub fn add(&mut self, repo_id: RepoId, filename: &Path, oid: &Option<git2::Oid>) -> Result<()> {
366 let mut deque = deque_from_path(filename);
367 let tree = self.0.entry(repo_id).or_default();
368 tree.add_blob(&mut deque, oid);
369 Ok(())
370 }
371
372 // Writes should only target HEAD
373 pub fn write(&self, root: &DataRoot, sig: &git2::Signature, message: &str) -> Result<()> {

Callers

nothing calls this directly

Calls 2

deque_from_pathFunction · 0.85
add_blobMethod · 0.80

Tested by

no test coverage detected