(skips: &[GraphFirstSkip], parsed: &ParsedCommit)
| 809 | } |
| 810 | |
| 811 | fn graph_first_skip_summary(skips: &[GraphFirstSkip], parsed: &ParsedCommit) -> String { |
| 812 | if skips.is_empty() { |
| 813 | return String::new(); |
| 814 | } |
| 815 | |
| 816 | skips |
| 817 | .iter() |
| 818 | .take(5) |
| 819 | .map(|skip| { |
| 820 | let lines = parsed |
| 821 | .files |
| 822 | .iter() |
| 823 | .find(|file| file.path == skip.path) |
| 824 | .and_then(|file| { |
| 825 | file.new_content |
| 826 | .as_deref() |
| 827 | .or(file.old_content.as_deref()) |
| 828 | .map(count_line_units) |
| 829 | }) |
| 830 | .unwrap_or(0); |
| 831 | format!( |
| 832 | "{} op={:?} reason={} lines={}", |
| 833 | skip.path, skip.operation, skip.reason, lines |
| 834 | ) |
| 835 | }) |
| 836 | .collect::<Vec<_>>() |
| 837 | .join("; ") |
| 838 | } |
| 839 | |
| 840 | fn trace_git_import_enabled() -> bool { |
| 841 | std::env::var_os("ATOMIC_TRACE_GIT_IMPORT").is_some() |
no test coverage detected