Skip to content

RefService: add ForEachRefWithObjects RPC

Jacob Vosmaer requested to merge jv-for-each-ref-2 into master

This MR adds a new RPC that runs git for-each-ref piped into git cat-file --batch. The resulting byte stream is parsed on the client side. The current goal is to replace FindAllTags but this RPC could be used to reimplement other Gitaly RPC's too in the future.

For now we implement sorting (--sort) and pattern selection (e.g. refs/heads). Pagination can be added in a later MR.

This is part of gitlab-com/gl-infra&600 (closed) and gitlab-com/gl-infra/scalability#1344 (closed).

Edited by Jacob Vosmaer

Merge request reports