MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / graph_first_skip_summary

Function graph_first_skip_summary

atomic-cli/src/commands/git/parallel.rs:811–838  ·  view source on GitHub ↗
(skips: &[GraphFirstSkip], parsed: &ParsedCommit)

Source from the content-addressed store, hash-verified

809}
810
811fn 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
840fn trace_git_import_enabled() -> bool {
841 std::env::var_os("ATOMIC_TRACE_GIT_IMPORT").is_some()

Callers 1

write_commitMethod · 0.85

Calls 2

is_emptyMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected