Applying suggestion from pull request converts CRLF to LF

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 6.7.0, 7.19.2
    • Severity 3 - Minor
    • 1

      Issue Summary

      Applying a code suggestion made in the pull request comment makes CRLF to LF.

      Steps to Reproduce

      1. Commit a test.txt file with content a\rb\r\nc
        It should look like
        $ hexdump test.txt
        0000000 61 0d 62 0d 0a 63
        
      2. Create a pull request for the file above
      3. Apply suggestion on the second line to be bbb

      Expected Results

      The file should be a\rbbb\r\nc
      i.e.

      $ hexdump test.txt
      0000000 61 0d 62 62 62 0d 0a 63
      

      Actual Results

      The carriage returns 0d are removed and line feed was converted as LF 0a instead of the original CRLF 0d 0a

      $ hexdump test.txt
      0000000 61 0a 62 62 62 0a 63
      

      Workaround

      LineReplacingOutputStream.class need to be patched.

              Assignee:
              Unassigned
              Reporter:
              Nobuyuki Mukai
              Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: