Skip to content

Patchwork always read and write files with \n line ending. #1129

Description

@CTY-git

Is this a regression?
No

Description
Currently line endings is always translated into \n, and patches are rewritten in \n. This can cause diffs to include unchanged parts of the code. Consider setting newline="" when opening files to retain original line endings and to consider the file to be modified for line endings.

Relevant doc: https://docs.python.org/3/library/functions.html#open

Please provide a link to a minimal reproduction of the bug
No response

Please provide the exception or error you saw
No response

Anything else?
No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions