Branch Divergence graph message does not refer to the default branch
<!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "bug" label. For the Community Edition issue tracker: - https://gitlab.com/gitlab-org/gitlab-ce/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab-ce/issues?label_name%5B%5D=bug For the Enterprise Edition issue tracker: - https://gitlab.com/gitlab-org/gitlab-ee/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab-ee/issues?label_name%5B%5D=bug and verify the issue you're about to submit isn't a duplicate. ---> ### Summary The Branch Divergence graph on the Branches list page always reads "x commits behind master, y commits ahead", regardless of wether the default branch is master or not. ### Steps to reproduce 1. Create new empty project and make an initial commit. 2. Create a new branch and make a commit. 3. Change the default branch of the project to the new branch. 4. Go to The Repository->Branches page. 5. Hover over the divergence graph of the master branch, it will read "1 commits behind master, 0 commits ahead" ### Example Project https://gitlab.com/0neblock/test-branch-divergence-project ### What is the current *bug* behavior? The divergent message shows the master branch, even it it is not the default branch. ### What is the expected *correct* behavior? The message should show the default branch. ### Relevant logs and/or screenshots ![Screen_Shot_2019-09-05_at_12.26.43_pm](/uploads/0e8cefc49f8d932e94ff08e267a85d57/Screen_Shot_2019-09-05_at_12.26.43_pm.png) ### Possible fixes https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/assets/javascripts/branches/divergence_graph.js This file has 'master' hardcoded for the DivergenceGraph Vue component, it should instead pass the name of the default branch.
issue