Editing file in Web UI considered as erasing whole file
Summary
When editing a file on web UI, with filename being only numbers, it seemed to erase the entire file instead.
This seems to be a frontend issue, as the POST params includes empty content
. This has been reproduced on both Firefox and Chrome.
Steps to reproduce
- Create a file with filename '123', with some contents
- Edit that file by changing a line
- Set a new branch name (other than master)
- Click 'Commit changes'
- In the merge request new form, click 'Changes' tab at the bottom.
Example Project
https://gitlab.com/lulalala/gitdiff
What is the current bug behavior?
All lines are shown as deleted
What is the expected correct behavior?
The diff should only change one line.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Results of GitLab application Check
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
Edited by Mark Chao