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

Function print_conflict_summary

atomic-cli/src/commands/insert.rs:764–777  ·  view source on GitHub ↗

After materializing the current view, list any conflicted files inline so the user does not have to run a second command to find them.

(repo: &Repository, working_copy: WorkingCopyId)

Source from the content-addressed store, hash-verified

762/// After materializing the current view, list any conflicted files inline so
763/// the user does not have to run a second command to find them.
764fn print_conflict_summary(repo: &Repository, working_copy: WorkingCopyId) {
765 let conflicts = match repo.list_conflicts(working_copy) {
766 Ok(c) => c,
767 Err(_) => return,
768 };
769 let entries = conflicts
770 .iter()
771 .map(|(path, records)| ConflictSummaryEntry {
772 path: path.clone(),
773 line: records.first().and_then(|c| c.line),
774 })
775 .collect::<Vec<_>>();
776 print_conflict_summary_entries(&entries);
777}
778
779/// One still-conflicted file for the inline summary: the path plus the
780/// first record's line — the two things the summary line prints (the

Callers 4

run_single_insertFunction · 0.85
run_view_insertFunction · 0.85
run_tagFunction · 0.85
run_change_insertFunction · 0.85

Calls 4

list_conflictsMethod · 0.45
iterMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected