(skips: &[GraphFirstSkip], parsed: &ParsedCommit)
| 748 | } |
| 749 | |
| 750 | fn graph_first_skip_summary(skips: &[GraphFirstSkip], parsed: &ParsedCommit) -> String { |
| 751 | if skips.is_empty() { |
| 752 | return String::new(); |
| 753 | } |
| 754 | |
| 755 | skips |
| 756 | .iter() |
| 757 | .take(5) |
| 758 | .map(|skip| { |
| 759 | let lines = parsed |
| 760 | .files |
| 761 | .iter() |
| 762 | .find(|file| file.path == skip.path) |
| 763 | .and_then(|file| { |
| 764 | file.new_content |
| 765 | .as_deref() |
| 766 | .or(file.old_content.as_deref()) |
| 767 | .map(count_line_units) |
| 768 | }) |
| 769 | .unwrap_or(0); |
| 770 | format!( |
| 771 | "{} op={:?} reason={} lines={}", |
| 772 | skip.path, skip.operation, skip.reason, lines |
| 773 | ) |
| 774 | }) |
| 775 | .collect::<Vec<_>>() |
| 776 | .join("; ") |
| 777 | } |
| 778 | |
| 779 | fn trace_git_import_enabled() -> bool { |
| 780 | std::env::var_os("ATOMIC_TRACE_GIT_IMPORT").is_some() |
no test coverage detected