-
Jacob Vosmaer authored
This reverts af43dd6a with the aim of reducing Gitaly server resouce usage when fetching Git data for CI builds. Instead of fetching the pipeline ref by SHA, we go back to fetching it by name 'refs/pipelines/1234'. This causes `git fetch` to use the 'ref-prefix' option [1] when fetching refs. At the time of af43dd6a, the server side implementation of 'ref-prefix' was very inefficient. This got fixed in Git by [2]. Currently each CI fetch causes a full ref walk on the Gitaly server. By going back to fetching by ref, this changes to a filtered refwalk which is much faster. Especially on repositories with many (server side) refs, such as gitlab-org/gitlab. [1]: https://gitlab.com/gitlab-org/gitlab-git/-/blob/v2.33.0/Documentation/technical/protocol-v2.txt#L191-193 [2]: https://gitlab.com/gitlab-org/gitlab-git/-/commit/b3970c702cb0acc0551d88a5f34ad4ad2e2a6d39
80c7702e