Send fully qualified ref in commits list query

What does this MR do and why?

Fixes #628204

When a branch and a tag share the same name, the Vue commits list sent the bare ref name to the GraphQL commits query. Git resolves bare names with refs/tags/* taking precedence over refs/heads/*, so the page showed the tag's history even when the URL had ?ref_type=heads or the user picked the branch from the disambiguation popup.

This MR adds a qualifiedRef computed that prefixes the ref with refs/<type>/ when the ref type is known (heads or tags), so an explicit ref type always wins. Commit SHAs have no ref type and are sent unchanged. pipelineRef stays bare because pipelines are matched on their stored bare ref name.

Refs containing slashes (e.g. feature/dev) pass through untouched, producing refs/heads/feature/dev.

Screenshots or screen recordings

before after
Screenshot_2026-09-11_at_14.23.21 Screenshot_2026-09-11_at_14.23.29

How to set up and validate locally

  1. In a test repo, create a branch and a tag with the same name pointing at different commits:
    git checkout -b dev && git commit --allow-empty -m "branch commit" && git push origin dev
    git tag dev HEAD~1 && git push origin refs/tags/dev
  2. Visit /<project>/-/commits/dev?ref_type=heads and confirm the branch commit is at the top.
  3. Visit /<project>/-/commits/dev?ref_type=tags and confirm the tag's commit is at the top.
  4. Visit /<project>/-/commits/<sha> and confirm the SHA view still works with the pipeline column populated.
Edited by Jacques Erasmus

Merge request reports

Loading
Loading