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

Source from the content-addressed store, hash-verified

2547 }
2548
2549 fn reseed_from_fallback_write(&mut self, repo: &Repository, parsed: &ParsedCommit) {
2550 for file in &parsed.files {
2551 match file.operation {
2552 FileOperation::Deleted => {
2553 self.files.remove(&file.path);
2554 }
2555 FileOperation::Renamed => {
2556 if let Some(old_path) = file.old_path.as_deref() {
2557 self.files.remove(old_path);
2558 }
2559 if let Some(new_content) = file.new_content.as_deref() {
2560 let hint = self
2561 .files
2562 .get(&file.path)
2563 .map(|indexed| indexed.imported_commits.saturating_add(1))
2564 .unwrap_or(1);
2565 self.seed_file_from_graph_content(repo, &file.path, new_content, hint);
2566 }
2567 }
2568 FileOperation::Added | FileOperation::Copied | FileOperation::Modified => {
2569 if let Some(new_content) = file.new_content.as_deref() {
2570 let hint = self
2571 .files
2572 .get(&file.path)
2573 .map(|indexed| indexed.imported_commits.saturating_add(1))
2574 .unwrap_or(1);
2575 self.seed_file_from_graph_content(repo, &file.path, new_content, hint);
2576 }
2577 }
2578 }
2579 }
2580 }
2581}
2582
2583#[derive(Debug, Clone)]

Callers

nothing calls this directly

Calls 3

removeMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected