Preserve a remote reference for merged MRs
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=398105)
</details>
<!--IssueSummary end-->
<!-- This template is a great use for issues that are feature::additions or technical tasks for larger issues.-->
### Proposal
At the moment, it can be difficult to reliably correlate commits that land in a branch to the commits that were in the merge request. This is because commits can be mutated as they land, chiefly due to squash merges. This can cause difficult-to-solve problems; for example:
1) reliably identifying MRs that commits came from (e.g. https://gitlab.com/gitlab-org/gitlab/-/issues/22694)
2) identifying commits for cherry-picking across branches (e.g. `git cherry`)
3) even identifying whether specific commits have landed (e.g. `git branch --contains`)
Today, gitlab maintains one or two long-lived refs for each MR:
- `refs/merge-requests/:iid/head` (the head of the MR branch)
- `refs/merge-requests/:iid/merge` (if using merge pipelines, the merge commit)
There's also a short-lived one `refs/merge-requests/:iid/train` to close a merge-train race condition.
My proposal is to add a third long-lived MR ref, `refs/merge-requests/:iid/completed` which points at the post-merge merge commit (post-squash) (or the last commit in the branch, if the fast-forwarding). I'm not tied to `completed`, I probably would have used `merged` if `merge` wasn't already in use.
Some examples of commands that I'd like to work (assume for these examples I have this fetch refspec in `.git/config`: `fetch = +refs/merge-requests/*:refs/remotes/origin/mr/*`) (forgive me for minor errors here, I'm writing them in this buffer)
- List MRs that have landed on a branch: `completed=($(git branch --merged origin/develop | grep 'mr/.*/completed' | cut -d / -f 2 ))`)
- Retrieve original commits given an mr: `for i in "${completed[@]}; do git diff $(git merge-base origin/develop mr/$i/head)..mr/$i/head`
- find downstream branches from the landed MR: `git branch -r --contains mr/12345/completed`
<!-- Use this section to explain the feature and how it will work. It can be helpful to add technical details, design proposals, and links to related epics or issues. -->
<!-- Consider adding related issues and epics to this issue. You can also reference the Feature Proposal Template (https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/issue_templates/Feature%20proposal%20-%20detailed.md) for additional details to consider adding to this issue. Additionally, as a data oriented organization, when your feature exits planning breakdown, consider adding the `What does success look like, and how can we measure that?` section.
-->
<!-- Label reminders
Use the following resources to find the appropriate labels:
- Use only one tier label choosing the lowest tier this is intended for
- https://gitlab.com/gitlab-org/gitlab/-/labels
- https://about.gitlab.com/handbook/product/categories/features/
-->
issue