(skips: &[GraphFirstSkip], parsed: &ParsedCommit)
| 861 | } |
| 862 | |
| 863 | fn graph_first_skip_summary(skips: &[GraphFirstSkip], parsed: &ParsedCommit) -> String { |
| 864 | if skips.is_empty() { |
| 865 | return String::new(); |
| 866 | } |
| 867 | |
| 868 | skips |
| 869 | .iter() |
| 870 | .take(5) |
| 871 | .map(|skip| { |
| 872 | let lines = parsed |
| 873 | .files |
| 874 | .iter() |
| 875 | .find(|file| file.path == skip.path) |
| 876 | .and_then(|file| { |
| 877 | file.new_content |
| 878 | .as_deref() |
| 879 | .or(file.old_content.as_deref()) |
| 880 | .map(count_line_units) |
| 881 | }) |
| 882 | .unwrap_or(0); |
| 883 | format!( |
| 884 | "{} op={:?} reason={} lines={}", |
| 885 | skip.path, skip.operation, skip.reason, lines |
| 886 | ) |
| 887 | }) |
| 888 | .collect::<Vec<_>>() |
| 889 | .join("; ") |
| 890 | } |
| 891 | |
| 892 | fn trace_git_import_enabled() -> bool { |
| 893 | std::env::var_os("ATOMIC_TRACE_GIT_IMPORT").is_some() |
no test coverage detected