Skip to content

Add a feature flag to preserve apply_patch line endings - #37758

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/531a7c66761959c650270559f57941929f03e6c4
Aug 10, 2026
Merged

Add a feature flag to preserve apply_patch line endings#37758
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/531a7c66761959c650270559f57941929f03e6c4

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 10, 2026

Copy link
Copy Markdown

Add a feature flag to preserve apply_patch line endings

What changed

  • Add the apply_patch_preserve_line_endings feature, disabled by default, to
    preserve CRLF, CR, and mixed line endings when apply_patch updates files.
  • Apply the feature consistently to built-in patch handling and patches invoked
    through shell, user-shell, unified-exec, and app-server command execution.
  • Keep the active feature configuration authoritative over inherited, shell
    snapshot, and client-provided environment values.

Testing

  • Cover line-ending behavior with the feature enabled and disabled for custom
    tool calls, shell heredocs, command execution, and the apply_patch CLI.

## What changed

- Add the `apply_patch_preserve_line_endings` feature, disabled by default, to
  preserve CRLF, CR, and mixed line endings when `apply_patch` updates files.
- Apply the feature consistently to built-in patch handling and patches invoked
  through shell, user-shell, unified-exec, and app-server command execution.
- Keep the active feature configuration authoritative over inherited, shell
  snapshot, and client-provided environment values.

## Testing

- Cover line-ending behavior with the feature enabled and disabled for custom
  tool calls, shell heredocs, command execution, and the `apply_patch` CLI.

GitOrigin-RevId: 531a7c66761959c650270559f57941929f03e6c4
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/531a7c66761959c650270559f57941929f03e6c4 branch from 10a6925 to c9c6c0d Compare August 10, 2026 01:45
@copyberry
copyberry Bot merged commit c9c6c0d into main Aug 10, 2026
30 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/531a7c66761959c650270559f57941929f03e6c4 branch August 10, 2026 01:46
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 10, 2026
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.