RefService.ListRefs: implement patterns
As of GitLab 15.7, many methods such as RefService.ListBranchNames
are deprecated in favor of using the patterns
argument of ListRefs
. Even on the Rails side, Repository#branch_exists?
actually relies on this (quite inefficient).
As a result, implementing the patterns
argument is mandatory for even the most basic functional tests of Heptapod to pass. Otherwise, the parsing gives nil
for refs that have the unexpected type, and everything explodes.
There is a minor complication: the ALL
pseudo ref that we include for backups should not be added if patterns
is not as the ListRefs
call done by gitaly-backup
.