# `ExAthena.Tools.ApplyPatch`
[🔗](https://github.com/udin-io/ex_athena/blob/v0.7.1/lib/ex_athena/tools/apply_patch.ex#L1)

Apply a unified diff patch across one or more files atomically.

All hunks across all files are validated in memory first (pure-Elixir backend)
before any file is written to disk — partial mutations on error are impossible.

Backend selection:
- Inside a git work-tree: delegates to `git apply --whitespace=nowarn`, which
  is itself atomic on failure.
- Otherwise: pure-Elixir two-pass parser/applier.

v1 limitations: no binary diffs, no `/dev/null` create/delete hunks, no fuzzy
context matching.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
