Parse **every** `Atomic-Changes:` trailer in a commit message. A GitHub (or GitLab/Azure) squash-merge concatenates the bodies of all squashed commits, so a single squash commit legitimately carries multiple** `Atomic-Changes:` blocks — one per materialization commit. We accumulate hashes across every block, de-duplicated with first-seen order preserved, so the ReviewGate links back to the *full*
(message: &str)
| 8458 | /// [`split_atomic_changes_value`] splitter but must keep these distinct |
| 8459 | /// notions of which trailers are relevant. |
| 8460 | fn parse_atomic_changes_trailer(message: &str) -> Option<Vec<String>> { |
| 8461 | let mut all: Vec<String> = Vec::new(); |
| 8462 | for line in message.lines() { |
| 8463 | let line = line.trim(); |
| 8464 | if let Some(rest) = line.strip_prefix("Atomic-Changes:") { |
| 8465 | for hash in split_atomic_changes_value(rest) { |
| 8466 | if !all.contains(&hash) { |
| 8467 | all.push(hash); |
| 8468 | } |
| 8469 | } |
| 8470 | } |
| 8471 | } |
| 8472 | if all.is_empty() { |
| 8473 | None |
| 8474 | } else { |
| 8475 | Some(all) |
| 8476 | } |
| 8477 | } |
| 8478 | |
| 8479 | /// Read one `Key: value` identity header from a commit message (the |
| 8480 | /// record-projection header format; RFC §8.2). |