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
- Create a branch in a project, using Git CLI not GitLab UI.
- Push the branch.
- Merge the branch into master (still using Git).
- Push master.
- Check the branches page. It should show a
mergedbadge, but it doesn't. - Make another commit to master and push it.
- Check the branches page again. Now shows the
mergedbadge.
Example Project
https://gitlab.com/mlapierre/merge-test/-/branches
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
Edited by Mark Lapierre
