Uploaded image for project: 'Sourcetree For Mac'
  1. Sourcetree For Mac
  2. SRCTREE-2857

Patch does not apply when staging lines

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 2.0.3
    • Git
    • None
    • Mac OS X 10.10.1

    • Severity 3 - Minor

      I have core.autocrlf=true set, and frequently change branches. This may lead to source files having CRLF endings instead of LF endings as would be usual on my platform. In this case, I can not stage individual lines or hunks using SourceTree, and the changes are rejected as "patch does not apply" because of "trailing whitespace". (Staging lines on the command line using 'git add -i' works without problems.) This problem can be resolved by changing the line endings back to LF. Similarly, the problem can be reproduced by converting a file to CRLF and trying to stage parts of it. I would assume that SourceTree could be fixed by checking for the line endings prior to staging patches. (Sorry if this issue has been raised before, I only did a very quick search.)

              Unassigned Unassigned
              9311f7d6c659 vogjak
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: