Renaming a file and updating it in single commit does not display the correct diff
Summary
When Renaming a file and update contents of that file in a single commit, gitlab doesnt show a diff for the file, it thinks a file was deleted and added instead of renamed and updated.
Steps to reproduce
- create a git repo and a test file
- commit the test file
- rename the test file and make edits(you can use
git mv, bug still happens) - commit the file and submit a PR
- view the changes tab in Gitlab, the diff of the file will be wrong
- do a git diff locally(git diff HEAD^) and see that git knows how to diff the files
Note: my work around atm is separating the renaming of files into a first commit, and committing the file content updates in second commit. that way i can view the diff from the second commit. but the total diff from two commits as pictured in 'changes' tab doesnt show the correct diff.(must click on that individual second commit to see the proper diff)
What is the expected correct behavior?
should see the correct diff even though renamed
- happy to add a sample repo to demonstrate or anything else if needed but i figure this should be straight forward
Edited by lakeisha