Skip to content

Conversation

@shanev
Copy link
Contributor

@shanev shanev commented Oct 22, 2025

Fixes #5485.

Fixed rename hunks so apply_patch resolves the destination path using the verifier’s effective cwd, ensuring patches that run under cd <worktree> && apply_patch stay inside the worktree.

Added a regression test (test_apply_patch_resolves_move_path_with_effective_cwd) that reproduced the old behavior (dest path resolved in the main repo) and now passes.

Related to #5483.

@shanev
Copy link
Contributor Author

shanev commented Oct 22, 2025

I have read the CLA Document and I hereby sign the CLA

@etraut-openai etraut-openai merged commit 316352b into openai:main Nov 7, 2025
44 of 46 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 7, 2025
@etraut-openai
Copy link
Collaborator

Thanks for the contribution!

@shanev shanev deleted the rename-worktree-bug branch November 7, 2025 04:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename patches fail when inside a git worktree

3 participants