From 40bf897b195f3342db9290d056de1bd5aa403d81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Lema=C5=84czyk?= Date: Fri, 3 Oct 2025 21:36:55 +0200 Subject: [PATCH] Instructions for apply_patch.cs extended --- AGENTS.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 0d04fa9..0249414 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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.