Instructions for apply_patch.cs extended

This commit is contained in:
Marek Lemańczyk committed 2025-10-03 21:36:55 +02:00
1 parent a21dcb5d70
commit 40bf897b19
1 file changed
+5 -2
+5 -2
View File
@@ -32,8 +32,11 @@ It supports the standard `git diff` patch files as input. You should be able to
* `--ignore-line-endings`
* `--target` - allows specifying target root directory for the patch
* Build patches in standard `git diff` format. It doesn't support `***` format.
* Build patches in small, line-precise hunks; confirm target lines with Get-Content before writing the diff to avoid context mismatches.
* Build patches in standard `git diff` format.
* It supports `---`, `+++`, and `@@`.
* It doesn't support `***` or `*** Begin/End Patch` wrappers.
* It requires `diff --git` at the beginning.
* Build patches in small, line-precise hunks; confirm target lines with `Get-Content` or `nl -ba` before writing the diff to avoid context mismatches.
* Regenerate the diff whenever the file shifts—never reuse an old hunk after other edits.
* Keep patch filenames unique and delete applied files to prevent accidental re-use.
* When a hunk fails, inspect the around-lines immediately and adjust rather than retrying the same diff.