Merge request lists incorrect 'changes'
Summary
Merge request shows some changes that aren't changes: The red 'subtracted' lines are not even the most up-to-date code from the target branch.
Steps to reproduce
From branch_a, check out new branch_b and change one file, push and create a merge request into branch_a. Using branch_b, check out new branch_ and change one more file, creating a merge request for this ALSO into branch_a. On gitlab, process the branch_b merge request. Then, the merge request for branch_c into branch_a should only list one file in its changes, but it will list 2, not recognising that branch_a code has been updated by branch_b being merged into it.
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version)
What is the current bug behavior?
The merge request for branch_c into branch_a will list 2 changes, not recognising that branch_a code has been updated by branch_b being merged into it.
What is the expected correct behavior?
The merge request for branch_c into branch_a should only list one change.
Relevant logs and/or screenshots
- foreach (Question::all() as $question) {
+ foreach (Question::all()->sortBy('input_name') as $question) {
(when viewing the target app's source code on gitlab, it already shows the second line, so the above shouldn't be listed as a change.)
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)