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

Source from the content-addressed store, hash-verified

748}
749
750fn 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
779fn trace_git_import_enabled() -> bool {
780 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