Files
codex/codex-rs/apply-patch/tests
Charlie Marsh 685270a56a Make apply_patch preserve line endings unconditionally (#51203)
## Why

Updating a CRLF file with `apply_patch` previously normalized its line endings to LF unless preservation was explicitly enabled. Preserve the file's existing line endings without requiring an opt-in.

## What changed

- Use line-ending-preserving updates for both tool calls and standalone `apply_patch` invocations, removing the legacy normalization mode.
- Mark `apply_patch_preserve_line_endings` as removed.
- Always set `CODEX_APPLY_PATCH_PRESERVE_LINE_ENDINGS=1` in child environments for compatibility with older patch executables, overriding stale values.

## Testing

Update CLI, tool-call, shell-heredoc, and app-server tests to check CRLF preservation by default. Keep coverage for overriding stale compatibility environment values.

GitOrigin-RevId: 96d0b0e5350faa3fc7a45d63627a132657b44523
2026-10-05 23:52:06 +00:00
..