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)
| 674 | /// After materializing the current view, list any conflicted files inline so |
| 675 | /// the user does not have to run a second command to find them. |
| 676 | fn print_conflict_summary(repo: &Repository) { |
| 677 | let conflicts = match repo.list_conflicts() { |
| 678 | Ok(c) => c, |
| 679 | Err(_) => return, |
| 680 | }; |
| 681 | if conflicts.is_empty() { |
| 682 | return; |
| 683 | } |
| 684 | println!(); |
| 685 | let file_word = if conflicts.len() == 1 { |
| 686 | "file" |
| 687 | } else { |
| 688 | "files" |
| 689 | }; |
| 690 | output::print_warning(&format!( |
| 691 | "{} conflicted {} — resolve markers, then record:", |
| 692 | conflicts.len(), |
| 693 | file_word |
| 694 | )); |
| 695 | for (path, records) in &conflicts { |
| 696 | let where_ = records |
| 697 | .first() |
| 698 | .and_then(|c| c.line) |
| 699 | .map(|l| format!(" (line {})", l)) |
| 700 | .unwrap_or_default(); |
| 701 | println!(" {}{}", path, where_); |
| 702 | } |
| 703 | output::print_hint("See 'atomic conflicts' for details."); |
| 704 | } |
| 705 | |
| 706 | /// Print the outcome of a cross-view insert operation. |
| 707 | fn print_cross_view_outcome(outcome: &CrossViewInsertOutcome, dry_run: bool) { |
no test coverage detected