Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-2816

Provide configurable whitespace settings on the diff view

    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Creating on behalf of customer:

      when reviewing Pull Requests, the diff view doesn't ignore white spaces at all, which results in the system highlighting differences in lines where tailing backspaces where added or replaced by spaces

            [BSERV-2816] Provide configurable whitespace settings on the diff view

            aamelkin added a comment -

            Oh, I see there is now 'Show whitespace characters' option. Didn't notice it earlier. Looks like it helps to see the tabs vs. spaces.

            aamelkin added a comment - Oh, I see there is now 'Show whitespace characters' option. Didn't notice it earlier. Looks like it helps to see the tabs vs. spaces.

            aamelkin added a comment - - edited

            @Adam Pryce, could your developer share his style for Stylish to achieve this? I badly need to see tabs vs. spaces! Thanks!

            aamelkin added a comment - - edited @Adam Pryce, could your developer share his style for Stylish to achieve this? I badly need to see tabs vs. spaces! Thanks!

            Adam Pryce added a comment -

            We would also like something to differentiate tabs. One developer used the Stylish plugin, but a per-user or in diff setting would be great:

            Adam Pryce added a comment - We would also like something to differentiate tabs. One developer used the Stylish plugin, but a per-user or in diff setting would be great:

            Hi, I'm looking for something similar. Instead of whitespaces, is there any way to enable/disable case-sensitivity of diffs?

            Dennis Campos added a comment - Hi, I'm looking for something similar. Instead of whitespaces, is there any way to enable/disable case-sensitivity of diffs?

            Hi mtomov & festerwim,

            As of Stash 2.8 there is a new "Ignore Whitespace" option available from a menu within diffs, as well as a keyboard shortcut while you are viewing a diff (Shift+W).

            This option will persist when switching to different files, pull requests, etc.

            John van der Loo (Inactive) added a comment - Hi mtomov & festerwim , As of Stash 2.8 there is a new "Ignore Whitespace" option available from a menu within diffs, as well as a keyboard shortcut while you are viewing a diff (Shift+W). This option will persist when switching to different files, pull requests, etc.

            1+ for making ?w=1 configurable or set by default. This is way too useful to be left out so well hidden.

            Millen Tomov added a comment - 1+ for making ?w=1 configurable or set by default. This is way too useful to be left out so well hidden.

            Is there an issue to track the fact that this is not configurable from the UI currently? I would like to vote for that since this is such a useful feature.

            I was struggeling to get it working with the URL append if there are multiple files in the change set. The trick is that you have to append when the URL still looks like this (This is the case just after switching to the 'diff' tab): http://stash.mycompany.com/projects/TST/repos/test-repo/pull-requests/33/diff

            Append the thing so it becomes: http://stash.mycompany.com/projects/TST/repos/test-repo/pull-requests/33/diff?w=1

            And now you can click on any file in the change set, it will keep this setting and ignore the whitespace.

            Wim Deblauwe added a comment - Is there an issue to track the fact that this is not configurable from the UI currently? I would like to vote for that since this is such a useful feature. I was struggeling to get it working with the URL append if there are multiple files in the change set. The trick is that you have to append when the URL still looks like this (This is the case just after switching to the 'diff' tab): http://stash.mycompany.com/projects/TST/repos/test-repo/pull-requests/33/diff Append the thing so it becomes: http://stash.mycompany.com/projects/TST/repos/test-repo/pull-requests/33/diff?w=1 And now you can click on any file in the change set, it will keep this setting and ignore the whitespace.

            CharlesA added a comment -

            Hi Patrick,

            You're quite correct. This is an unfortunate side-effect that git diff-tree --ignore-all-space doesn't respect the whitespace argument, which is what we use to calculate the file listing. I'm not sure there is much we can do in the short term for this. We would actually have to run git diff, which is far more expensive and also doesn't provide the same file information that we require.

            Cheers,
            Charles

            CharlesA added a comment - Hi Patrick, You're quite correct. This is an unfortunate side-effect that git diff-tree --ignore-all-space doesn't respect the whitespace argument, which is what we use to calculate the file listing. I'm not sure there is much we can do in the short term for this. We would actually have to run git diff , which is far more expensive and also doesn't provide the same file information that we require. Cheers, Charles

            ?w=1 does work on the content of files, but not on the file listing, it shows files that have no changes except for whitespace changes.

            Patrick Adrichem added a comment - ?w=1 does work on the content of files, but not on the file listing, it shows files that have no changes except for whitespace changes.

            CharlesA added a comment -

            Hi kostmo1, I've re-opened STASH-3105 as we haven't addressed the issue of tab spacing by ignoring whitespace in the diff.

            CharlesA added a comment - Hi kostmo1 , I've re-opened STASH-3105 as we haven't addressed the issue of tab spacing by ignoring whitespace in the diff.

              Unassigned Unassigned
              ganand Gurleen Anand [Atlassian]
              Votes:
              25 Vote for this issue
              Watchers:
              29 Start watching this issue

                Created:
                Updated:
                Resolved: