Skip to content

Side by side diff does not show modifications

Step to reproduce:

  • Create a sample git repository
  • Create a file modified.txt:
This line has been added
This line will be modified
This line will be deleted
  • commit to master&push to origin.
git add modified.txt
git commit -am "add lines to modify"
git push
  • Create a branch: git checkout -b modifications1
  • Modify modified.txt:
This line has been added
This line has been modified
  • Commit, push and create merge request
git add modified.txt 
git commit -am "modify the file"
git push origin modifications1

See an example merge request here:miscreant/side-by-side-diff-test!1 (diffs)

Expected Output: The added/modified line should be shown in the side-by-side diff

Actual Output: The modified line is not shown at all.

Inline Diff: Selection_017

Side-by-side Diff: Selection_018

GitLab version: Selection_016