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:863–890  ·  view source on GitHub ↗
(skips: &[GraphFirstSkip], parsed: &ParsedCommit)

Source from the content-addressed store, hash-verified

861}
862
863fn 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
892fn trace_git_import_enabled() -> bool {
893 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