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

Function print_conflict_summary

atomic-cli/src/commands/insert.rs:777–790  ·  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

775/// After materializing the current view, list any conflicted files inline so
776/// the user does not have to run a second command to find them.
777fn print_conflict_summary(repo: &Repository, working_copy: WorkingCopyId) {
778 let conflicts = match repo.list_conflicts(working_copy) {
779 Ok(c) => c,
780 Err(_) => return,
781 };
782 let entries = conflicts
783 .iter()
784 .map(|(path, records)| ConflictSummaryEntry {
785 path: path.clone(),
786 line: records.first().and_then(|c| c.line),
787 })
788 .collect::<Vec<_>>();
789 print_conflict_summary_entries(&entries);
790}
791
792/// One still-conflicted file for the inline summary: the path plus the
793/// 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