Undesired conversion of line endings of whole file when discarding selected lines (CR-LF to LF)

XMLWordPrintable

    • Type: Bug
    • Resolution: Resolved Locally
    • Priority: Medium
    • None
    • Affects Version/s: 1.1.1
    • Component/s: Git
    • None
    • Environment:

      Windows

      SourceTree will convert a whole file from CR-LF (win) to LF (linux) if you use the "Discard Selected Lines" function for a CR-LF file on Windows.

      Reproduce:

      • Under Windows, create an ANSI file with CR-LF ending and check it into your repository.
      • Modify a single line (or multiple lines) inside an external editor (notepad++).
      • Select some lines of this file inside SourceTree and chose "Discard selected Lines"

      Result:

      • The whole file will be converted to LF and for this marked as 100% modified.

        1. after.png
          after.png
          10 kB
        2. before.png
          before.png
          15 kB

            Assignee:
            Steve Streeting (Inactive)
            Reporter:
            Erik Zijp
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: