This is expected behavior of Git diff and there is nothing wrong in this case. See the issue 52036.
When we look the plain diff, we can see that, the old content used Windows style line endings (CR LF), whereas the new content is stored with Unix style line endings (LF).
>> old style.scss file content
Line 1 CR LFLine 2 CR LF
>> new style.scss file content
Line 1 LFLine 2 LFWe may skip those white space changes from compression using GitLab or Git via UI or command line.Steps to hide/ignore white space changes from git diff.
Go to your merge request. Navigate to change between section. Click on the setting button, from right side of "change between section" Unchecked the option "Show whitespace changes"After doing this you the compare section will show only real changes. Below is the screenshot which you refer.We can also see the exact diff using ignore space commandgit diff --ignore-space-at-eolReferences
No comments:
Post a Comment