Support fully qualified refs for blobs view
What does this MR do and why?
In order to disambiguate tags and branches with the same name on the blobs view this:
- updates blob resolver to accept
ref_type
parameter - updates frontend components to supply
ref_type
parameter - updates blob presenter render paths including the
ref_type
parameter
Contributes to: #219583 (closed)
How to set up and validate locally
- enable the
use_ref_type_parameter
feature flag - create a project
- make a commit with some change(
echo 'hello' > hello.txt && git add hello.txt && git commit -m 'hello'
) - add a tag and push it (
git tag 'hello' && git push origin hello
) - make another change (
echo 'hello again ' >> hello.txt && git add hello.txt && git commit -m 'hello again'
) - make a branch with the same name and push (
git checkout -b hello && git push origin refs/heads/hello
) - open the blob view and see that the contents of blobs is correct for the branch vs the tag by changing the
ref_type
parameter (http://127.0.0.1:3000/root/projectname/-/blob/hello/hello.txt?ref_type=heads)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #219583 (closed)
Edited by Jerry Seto