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