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:3563–3578  ·  view source on GitHub ↗

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

(message: &str)

Source from the content-addressed store, hash-verified

3561
3562/// Parse "Atomic-Changes: HASH1, HASH2, ..." from a commit message.
3563fn parse_atomic_changes_trailer(message: &str) -> Option<Vec<String>> {
3564 for line in message.lines() {
3565 let line = line.trim();
3566 if let Some(rest) = line.strip_prefix("Atomic-Changes:") {
3567 let hashes: Vec<String> = rest
3568 .split(',')
3569 .map(|s| s.trim().to_string())
3570 .filter(|s| !s.is_empty())
3571 .collect();
3572 if !hashes.is_empty() {
3573 return Some(hashes);
3574 }
3575 }
3576 }
3577 None
3578}
3579
3580/// Parse a PR/MR number from a commit message.
3581///

Callers 2

classify_commitFunction · 0.85

Calls 2

linesMethod · 0.45
is_emptyMethod · 0.45

Tested by 1