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.
  2. Push the branch.
  3. Merge the branch into master (still using Git).
  4. Push master.
  5. Check the branches page. It should show a merged badge, but it doesn't.
  6. Make another commit to master and push it.
  7. Check the branches page again. Now shows the merged badge.

Example Project

https://gitlab.com/mlapierre/merge-test/-/branches

merge.

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

Edited Nov 16, 2020 by Mark Lapierre
Assignee Loading
Time tracking Loading