forked from openai/codex
-
Notifications
You must be signed in to change notification settings - Fork 0
Patched files have mixed line endings on Windows #1
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingcrnd:human:autoController may continue without maintainer intervention.Controller may continue without maintainer intervention.crnd:lifecycle:managedItem is managed by consensus-loop.Item is managed by consensus-loop.crnd:phase:implementingImplementation worker is active.Implementation worker is active.upstream-backlogMirrored from openai/codex for the consensus-loop backlogMirrored from openai/codex for the consensus-loop backlog
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcrnd:human:autoController may continue without maintainer intervention.Controller may continue without maintainer intervention.crnd:lifecycle:managedItem is managed by consensus-loop.Item is managed by consensus-loop.crnd:phase:implementingImplementation worker is active.Implementation worker is active.upstream-backlogMirrored from openai/codex for the consensus-loop backlogMirrored from openai/codex for the consensus-loop backlog
Type
Fields
Give feedbackNo fields configured for issues without a type.
Upstream: openai#4003
Area / crate:
codex-apply-patch(codex-rs/apply-patch)Why selected: high impact (51 👍), deterministic, single-crate, unit-testable without Windows.
Acceptance criteria
codex-apply-patchthat apply a patch to CRLF content and assert CRLF is preserved, plus an LF control case.codex-rs/apply-patchunless strictly required.Original upstream report (openai#4003)
When codex makes changes to files, it does not adhere to the line endings in the file but appears to always use Unix-style LF. On Windows with files using CRLF, this leads to inconsistent line endings in the file. When opening these files in Visual Studio, for example, VS warns about this fact and asks whether line endings should be normalized.
Expected behavior: codex should use LF line endings if the file already uses LF, and CRLF endings if the file already uses CRLF.
Repro platform: Windows NT 10.0.26120 x64, Codex 0.39.0.