Patch
patchApply a unified diff to an existing text file, requiring exact hunk matches before writing. Use dry-run to preview the result without changes.
Instructions
Apply a single-file unified diff to one existing text file, like git apply. Nothing is written unless every hunk applies in file order with exactly matching context; hunks are found by their context, so start line numbers may be off.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| diff | Yes | Single-file unified diff to apply (as produced by the diff tool or edit dry-run) | |
| path | Yes | File to apply the diff to | |
| dryRun | No | Preview the result without writing (default: false) |