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

Function parse_atomic_changes_trailer

atomic-cli/src/commands/git/parallel.rs:3593–3608  ·  view source on GitHub ↗

Parse "Atomic-Changes: HASH1, HASH2, ..." from a commit message.

(message: &str)

Source from the content-addressed store, hash-verified

3591
3592/// Parse "Atomic-Changes: HASH1, HASH2, ..." from a commit message.
3593fn parse_atomic_changes_trailer(message: &str) -> Option<Vec<String>> {
3594 for line in message.lines() {
3595 let line = line.trim();
3596 if let Some(rest) = line.strip_prefix("Atomic-Changes:") {
3597 let hashes: Vec<String> = rest
3598 .split(',')
3599 .map(|s| s.trim().to_string())
3600 .filter(|s| !s.is_empty())
3601 .collect();
3602 if !hashes.is_empty() {
3603 return Some(hashes);
3604 }
3605 }
3606 }
3607 None
3608}
3609
3610/// Parse a PR/MR number from a commit message.
3611///

Callers 2

classify_commitFunction · 0.85

Calls 2

linesMethod · 0.45
is_emptyMethod · 0.45

Tested by 1