Add option to ignore line endings and/or whitespace in a diff (BB-3879)

Timwi avatarTimwi created an issue

I just submitted a smallish change. The website shows it as a humongous change because it considers every line as edited.

Presumably this must be due to line endings in some way.

I propose that the website diff ignores differing line endings and just normalises them. Otherwise the diff is just not useful.

Here is an example.

Comments (60)

  1. Health Monitoring Systems

    Not to split hairs, but to me this issue is not a duplicate of #6024. That issue is for side-by-side view (which is decent enough imho), whereas this issue is for the default diff view (where I'd like to have an option to ignore whitespaces and linebreaks with a ?w=1 or something like that appended in URL like what GitHub does).

  2. Howard Jess

    Not a dup. The side-by-side display is not fully equivalent to the standard diff. Why would you want to support the w=1 flag in only one mode? That would seem to be more difficult than allowing it in either mode.

  3. picklit

    +1 I battle this constantly. Isn't this just a matter of SourceTree exposing config that gets passed through to git diff which already supports line-ending and/or whitespace options?

    Work-around is to use an external Merge tool

  4. Sean McCarthy

    Everyone who cares about this- vote for it and get everyone in your development team to do the same. At the moment this issue ranks 15th by votes.

    Also, there's a similar issue raised about ignoring whitespace in side by side diffs: #6024

    If we vote for that too, maybe the fix will address both issues.

  5. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.