Skip to content

Added whitespace only change empty state

Phil Hughes requested to merge ph/390666/whitespaceDiffEmptyState into master

What does this MR do and why?

Adds an empty state for when a diff file has only whitespace changes

Screenshots or screen recordings

Screen_Recording_2023-05-31_at_10.47.52

How to set up and validate locally

  • Turn on feature flag: Feature.enable(:add_ignore_all_white_spaces)
  • Add and commit this a file called TESTFILE with the following contents into a repository:
Leading whitespace with tab 1
Leading whitespace with space 2
Trailing whitespace with tab 3
Trailing whitespace with space 4
  • Make a new branch. Eg. whitespace-test

  • Replace TESTFILE with the following contents (Note the leading/trailing whitespace changes as well):

            Leading whitespace with tab 1
     Leading whitespace with space 2
    Trailing whitespace with tab 3	
    Trailing whitespace with space 4 
  • Create a new MR from this branch.

  • View the merge request diff with the Show whitespace changes setting turned off

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

#390666 (closed)

Edited by Ali Ndlovu

Merge request reports