Uploaded image for project: 'Sourcetree for Windows'
  1. Sourcetree for Windows
  2. SRCTREEWIN-2294

sourcetree, git and line endings on windows (and visual studio)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Medium
    • None
    • 1.6.3
    • Git
    • version 1.6.4.0 does that too.

    • Severity 2 - Major

    Description

      sourcetree modifies line endings in an unwanted way. i noticed this behaviour at least 6 months ago, so it's quite an old bug.

      in the first round i tried to resolve it here:
      https://answers.atlassian.com/questions/5703353/answers/9375631?flashId=362096352

      repro:

      i have a file in stash, that has only one hunk in it. i will attach stashed patch, and few versions of the modified file.

      1) clean repository:
      $ file /d/src/lib/onExit.cpp
      /d/src/lib/onExit.cpp: C++ source, ASCII text, with CRLF line terminators
      2) apply stash:
      $ file /d/src/lib/onExit.cpp
      /d/src/lib/onExit.cpp: C++ source, ASCII text, with CRLF line terminators
      3) select green line
      discard green line by clicking at 'discard lines'
      $ file /d/src/lib/onExit.cpp
      /d/src/lib/onExit.cpp: C++ source, ASCII text, with CRLF line terminators
      4) discard hunk
      $ file /d/src/lib/onExit.cpp
      /d/src/lib/onExit.cpp: C++ source, ASCII text, with CRLF, LF line terminators

      Attachments

        1. onExit_discarded_green_line.cpp
          1 kB
        2. onExit_discarded_hunk.cpp
          1 kB
        3. onExit_orig.cpp
          1 kB
        4. onExit_stash_applied.cpp
          1 kB
        5. stash_crlf.patch
          0.6 kB

        Activity

          People

            Unassigned Unassigned
            357fd3a3bf05 mojmir svoboda
            Votes:
            17 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated: