feat: Improve git ref resolution by resolving symbolic refs
What does this MR do?
Previously support for non-hash references required unambiguous refs, see git definitions. These are cumbersome so we should instead resolve short refs by using git ls-remote
and supporting short refs like main
instead of ref/heads/main
What are the relevant issue numbers?
Related to gitlab-org/gitlab#393452 (closed) but not required for it.
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer
Edited by Lucas Charles