Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-14012

Revert chunk does not work for files with CRLF on linux

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 3.6.0-beta1
    • Qt Creator 3.3.0, Qt Creator 3.5.0-beta1
    • None
    • Qt Creator version: 3.3, git-master
      OS: Linux Mint 17.1
      Qt: 5.3.2

    Description

      Discussed at the mail list

      I use Git and try to revert chunk and got next error:

      Executing in /home/alexd/programming/someprog-git: /usr/bin/patch -p0 -R
      patching file Common/Common.cpp
      Hunk #1 FAILED at 38 (different line endings).
      1 out of 1 hunk FAILED -- saving rejects to file Common/Common.cpp.rej
      
      "/usr/bin/patch" failed (exit code 1).
      

      I look into Common.cpp.rej and found that it has Unix line ends but
      source file Windows line ends.

      Look like DiffChunk::asPatch ignores lines ends in source file.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTCREATORBUG-14012
          # Subject Branch Project Status CR V

          Activity

            People

              orgads Orgad Shaneh
              monah_tuk Alexander Drozdov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes