Fix: Correct rename detection in apply_patch to check per-diff instead of full patch (#10913)

Signed-off-by: Bogdan Petkovic <bogdan@fatdragon.dev>
Co-authored-by: Bogdan Petkovic <bogdan@fatdragon.dev>
This commit is contained in:
Bogdan Petković 2025-10-13 15:47:01 +02:00 committed by GitHub
parent 2bbe15a329
commit 399bf92ed1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,7 +59,7 @@ def apply_patch(repo_dir: str, patch: str) -> None:
continue
# Handle file rename
if old_path and new_path and 'rename from' in patch:
if old_path and new_path and 'rename from' in diff.text:
# Create parent directory of new path
os.makedirs(os.path.dirname(new_path), exist_ok=True)
try: