Ability to mention branches and tags as you would mention a commit or a person

Description

Often times we miss the possibility to mention branches and tags just as we mention users or commits. I open this issue to learn if others feel the need for this feature too and to debate pros and cons. It's related to the issue #34004 (moved) by @jamedjo. These two features would actually complement each other very well, I suppose.

Proposal

Add the ability to mention a project's branch or a commit by tag name in markdown in any place where commits and users can be mentioned. This would create a link to the branch as in https://gitlab.com/gitlab-org/gitlab-ce/tree/dev or to the commit as in https://gitlab.com/gitlab-org/gitlab-ce/tree/v6.9.2 for example.

Use cases

  1. Mention a release tag by tag name and not by commit hash because it's easier to remember.
  2. Mention a branch in a comment and have a link to it right out of the box. (That's where #34004 (moved) kicks in.)

Feature checklist

Make sure these are completed before closing the issue, with a link to the relevant commit.