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

Method reseed_from_fallback_write

atomic-cli/src/commands/git/parallel.rs:703–734  ·  view source on GitHub ↗
(&mut self, repo: &Repository, parsed: &ParsedCommit)

Source from the content-addressed store, hash-verified

701 }
702
703 fn reseed_from_fallback_write(&mut self, repo: &Repository, parsed: &ParsedCommit) {
704 for file in &parsed.files {
705 match file.operation {
706 FileOperation::Deleted => {
707 self.files.remove(&file.path);
708 }
709 FileOperation::Renamed => {
710 if let Some(old_path) = file.old_path.as_deref() {
711 self.files.remove(old_path);
712 }
713 if let Some(new_content) = file.new_content.as_deref() {
714 let hint = self
715 .files
716 .get(&file.path)
717 .map(|indexed| indexed.imported_commits.saturating_add(1))
718 .unwrap_or(1);
719 self.seed_file_from_graph_content(repo, &file.path, new_content, hint);
720 }
721 }
722 FileOperation::Added | FileOperation::Copied | FileOperation::Modified => {
723 if let Some(new_content) = file.new_content.as_deref() {
724 let hint = self
725 .files
726 .get(&file.path)
727 .map(|indexed| indexed.imported_commits.saturating_add(1))
728 .unwrap_or(1);
729 self.seed_file_from_graph_content(repo, &file.path, new_content, hint);
730 }
731 }
732 }
733 }
734 }
735}
736
737#[derive(Debug)]

Callers 1

write_commitMethod · 0.80

Calls 3

removeMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected