You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8ae0a89
Browse filesBrowse the repository at this point in the historyBrowse files
fix(agents): apply_patch converts CRLF files to mixed line endings (#115943)
* fix(agents): preserve CRLF line endings in apply_patch update hunks
applyUpdateHunk split file contents on "\n" and rejoined with "\n", so
every line the hunk covered lost its carriage return, including the
context lines the patch declares unchanged. On a CRLF working tree a
one-line patch left a mixed-ending file on disk.
Detect the file line ending, run the hunk matcher on LF-normalized lines,
and restore the original ending on write. The line-ending helpers move
out of the edit tool into src/agents/line-endings.ts so both file-mutating
tools share one implementation.
* fix(agents): avoid normalizing mixed line endings
---------
Co-authored-by: Vincent Koc <[email protected]>
0 commit comments