Compare branches assumes left branch is default branch
Summary
Comparing two non-default branches actually results in comparing the right branch to the default branch. GitLab ignores the branch selected as the left branch.
Steps to reproduce
- Go to Repository -> Branches.
- Select any non-default branch as the left branch, and any non-default branch as the right branch. You will notice that the diff is the same as if you compared the default branch to the right non-default branch.
- Also, select any non-default branch as the left branch and the default branch as the right branch. You will get an error that reads you are not allowed to compare the same branch to itself.