Stop calling ExtractsRef#tree with ref_type when using sha
What does this MR do and why?
The ref_type
parameter should be not be used for the tree
method when the ref is a sha for a commit. It causes the ref that is actually used to look up tree entries to be incorrect
The ref_type
parameter should be used when a request with a ref name and ref_type
to:
- create a fully qualified ref
- provided context during serialization about whether the ref is a branch or a tag.
This change is to stop calling tree with ref_type erroneously
How to set up and validate locally
- create a project
- create file in a directory (e.g
mkdir test && touch test/test
) - commit the file and push the changes to a branch (e.g
git add test/test && git commit -m "test" && git push origin main
) - see that the directory is there (e.g
http://gdk.test/root/test-project/-/tree/main/test
) - see that the directory is there when providing ref_type (e.g
http://gdk.test/root/test-project/-/tree/main/test?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.