Skip to content

fix(patch): make from_str strict by default#82

Merged
bmwill merged 1 commit intobmwill:masterfrom
weihanglo:invert-from-str
Apr 23, 2026
Merged

fix(patch): make from_str strict by default#82
bmwill merged 1 commit intobmwill:masterfrom
weihanglo:invert-from-str

Conversation

@weihanglo
Copy link
Copy Markdown
Contributor

This removes from_str_strict, and replace from_str with the strict parsing behavior.

See #51 for more.

Rationale: Patch users parse a single, known patch and expect strict validation.The lenient path is only needed internally by PatchSet. If users ever want the lenient behavior, possible they are parsing multiple file patches, so should use PatchSet.

Real Rationale: Make our API slimmer.

This removes `from_str_strict`, and
replace `from_str` with the strict parsing behavior.

See <bmwill#51> for more.

Rationale:

`Patch` users parse a single, known patch and expect strict validation.
The lenient path is only needed internally by `PatchSet`.
If users ever want the lenient behavior,
possible they are parsing multiple file patches,
so should use `PatchSet`.
@bmwill bmwill merged commit 420a9d6 into bmwill:master Apr 23, 2026
26 checks passed
@weihanglo weihanglo deleted the invert-from-str branch April 23, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants