No "merged" badge when branch is merged via CLI until another commit
### Summary If a branch is merged via the UI, the branches page shows a `merged` badge/icon/label immediately. But if the branch is merged externally and then pushed (e.g., via Git CLI), the badge doesn't appear until another commit is made. Discovered while working on a test during a gitlab-ce~2278656 tech interview: https://gitlab.com/gitlab-org/gitlab-ce/issues/48529 ### Steps to reproduce 1. Create a branch in a project, using Git CLI not GitLab UI. 1. Push the branch. 1. Merge the branch into master (still using Git). 1. Push master. 1. Check the branches page. It should show a `merged` badge, but it doesn't. 1. Make another commit to master and push it. 1. Check the branches page again. Now shows the `merged` badge. ### Example Project https://gitlab.com/mlapierre/merge-test/-/branches ![merge](/uploads/701ee572fb8ed3d0d3b0ce8702d9e236/merge.png). All git operations were done via Git CLI. Branch `merge-me` was merged first and then `merge-me-too` was merged, but it doesn't show a `merged` badge. ### What is the current *bug* behavior? The branches page doesn't show a `merged` badge even though the branch has been merged. ### What is the expected *correct* behavior? The branches page shows a `merged` badge for all merged branches ### Output of checks This bug happens on GitLab.com /cc @jramsay @DouweM
issue