Confusing/Incorrect branch shown on merge request after rebase/force push
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
Activity section of MR Overview shows incorrect branch details when listing a summary
Visible on this merge request
Steps to reproduce
I've replicated this in https://gitlab.com/simonstreet_ultimate_group/public/zd-553245-master - although it took a few attempts so the history may be a bit confusing.
- Have a project with master and develop at the same point (for this replication
masterwas one commit ahead ofdevelopwhere it was merged to bring them in line) - Default branch should be
develop - Create two branches,
conflict1andconflict2based onmastergit checkout master; git checkout -b conflict1; git checkout master; git checkout -b conflict2
- Create a change on
conflict2, push it, create and merge a MR forconflict2->developecho conflict2 > conflictfile; git add conflictfile; git commit -m 'confilict'; git push origin conflict2- simonstreet_ultimate_group/public/zd-553245-master!9 (merged)
- Create and merge a MR for
develop->master - Create a change on
conflict1, push it, create and merge a MR forconflict1->developgit checkout conflict1; echo conflict1 > conflictfile; git add conflictfile; git commit -m 'confilict'; git push origin conflict1-
simonstreet_ultimate_group/public/zd-553245-master!11 (NB: this MR has had the following steps performed to it, but you would see a conflict here due to the changes from
conflict2we merged earlier
- Perform the following to rebase
masteragainstconflict1and force push toconflict1to resolve the conflictgit checkout master; git pull-
git checkout conflict1; git rebase origin/master- conflict warning about conflictfile git add conflictfile-
git rebase --continue(prompted for commit message, accepted default) -
git push origin conflict1(failed) git push origin conflict1 --force
- View the MR and observe that the
Activitysection labels the commits that were merged frommasteras coming fromdevelop
Example Project
https://gitlab.com/simonstreet_ultimate_group/public/zd-553245-master
What is the current bug behavior?
Activity summary links to wrong branch
What is the expected correct behavior?
Activity summary links to correct branch
Relevant logs and/or screenshots
Screenshot above
Output of checks
Happens on GitLab.com
Results of GitLab environment info
n/a
Results of GitLab application Check
n/a
Possible fixes
n/a
Edited by 🤖 GitLab Bot 🤖
