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:590–621  ·  view source on GitHub ↗
(&mut self, repo: &Repository, parsed: &ParsedCommit)

Source from the content-addressed store, hash-verified

588 }
589
590 fn reseed_from_fallback_write(&mut self, repo: &Repository, parsed: &ParsedCommit) {
591 for file in &parsed.files {
592 match file.operation {
593 FileOperation::Deleted => {
594 self.files.remove(&file.path);
595 }
596 FileOperation::Renamed => {
597 if let Some(old_path) = file.old_path.as_deref() {
598 self.files.remove(old_path);
599 }
600 if let Some(new_content) = file.new_content.as_deref() {
601 let hint = self
602 .files
603 .get(&file.path)
604 .map(|indexed| indexed.imported_commits.saturating_add(1))
605 .unwrap_or(1);
606 self.seed_file_from_graph_content(repo, &file.path, new_content, hint);
607 }
608 }
609 FileOperation::Added | FileOperation::Copied | FileOperation::Modified => {
610 if let Some(new_content) = file.new_content.as_deref() {
611 let hint = self
612 .files
613 .get(&file.path)
614 .map(|indexed| indexed.imported_commits.saturating_add(1))
615 .unwrap_or(1);
616 self.seed_file_from_graph_content(repo, &file.path, new_content, hint);
617 }
618 }
619 }
620 }
621 }
622}
623
624#[derive(Debug)]

Callers 1

write_commitMethod · 0.80

Calls 3

removeMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected