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

Error 1, git apply, patch failed, trailing whitespace

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • Git
    • None
    • OS X 10.10.3
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Trying to revert some changes via "Discard hunk". The change was: a blank line that contained some trailing spaces into just a blank line (with no spaces). This change came about from adding some debugging code and subsequently removing it (leaving a different blank line that was there before).

      It appears that git-apply is refusing to apply the patch (to revert the change) because it would only add whitespace.

      There's an option to git-apply to ignore this

      --ignore-whitespace

      or to deal with it

      --whitespace=<action>

      but SourceTree doesn't use those, or even expose them to me as a user to tell SourceTree that I want that option used.

      The only work-around seems to be to go into the IDE and changes the lines myself, which defeats the purpose of using SourceTree in the first place...

              Unassigned Unassigned
              4812fb0b8b2f Randall Meadows
              Votes:
              4 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: