upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/lib/mbox_parser.rs
AgeCommit message (Collapse)Author
2026-02-25fix: update hardcoded libgit2 version strings in tests to 1.9.2DanConwayDev
The Nix environment provides libgit2 1.9.2 via nixpkgs, which libgit2-sys picks up at build time instead of using its bundled version. This caused test assertions that hardcode the libgit2 version string (appended by libgit2 to patch output) to fail after commit 319bb7f added new Cargo dependencies, though the exact mechanism by which those dependencies triggered the switch from the bundled 1.9.1 to the system 1.9.2 remains unclear. Also bump git2 from 0.20.2 to 0.20.4 in both Cargo.toml files so the bundled libgit2-sys version (0.18.3+1.9.2) properly aligns with the 1.9.2 version in use.
2026-02-18fix: harden apply_patch_chain when optional patch tags absentDanConwayDev
- Replace .unwrap() calls in filter closure with pattern-let guards so a missing/invalid mbox commit id conservatively includes the patch - Use the OID returned by create_commit_from_patch as branch tip instead of the tag commit id, which may differ for GPG-signed commits - Add module-level doc comment to mbox_parser explaining design rationale and known limitations around the mbox envelope SHA1
2026-02-18fix: improve mbox patch parser resilience for optional tag fallbackDanConwayDev
- Use mailparse crate to handle RFC 2047 encoded-words (Q/B encoding) and RFC 2822 header folding in Subject and From headers - Fix email signature separator check: use exact match 'line == "-- "' instead of starts_with to avoid false positives on body lines - Remove dead/incorrect asctime parsing in committer date extraction; simplify to always return None (falls back to author_timestamp)
2026-02-18feat: handle missing optional patch tags for pr/ flowDanConwayDev
- Add mbox_parser module to extract metadata from patch content - Extract author/committer from From: and Date: headers when tags missing - Extract commit message body as fallback for description tag - Implement best-guess parent commit logic using committer timestamps - Update patch_supports_commit_ids to accept mbox-parseable patches - Enable patches without optional tags to appear as pr/ branches