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)
| 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. |
| 764 | fn 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 |
no test coverage detected