Diff shows a complete file content change with just one newline
Summary
When adding newlines through web interface the whole file content is treated as new content.
Steps to reproduce
- Create a project
- Add a file through git client
- Edit the pushed file through the web interface and add just one line
- Diff with the previous commit
Example Project
Reproduced on gitlab.com: https://gitlab.com/danieljg/testing-web-ui/merge_requests/2/diffs
What is the current bug behavior?
The whole file is seen as different. The diff is incorrect.
What is the expected correct behavior?
Only the new line should be considered a diff.
Relevant logs and/or screenshots
https://gitlab.com/danieljg/testing-web-ui/merge_requests/2/diffs
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Also reproduced on our instance:
GitLab 11.2.5-ee (da87da28) git version 1.8.3.1 for tests.