Revert "Merge branch 'ps-ref-fix' into 'master'"
This reverts merge request !5027 (merged)
This causes the failure for https://gitlab.com/gitlab-org/gitlab/-/jobs/3298615344
expected Gitlab::Git::CommandError with "13:could not find page token.", got #<Gitlab::Git::CommandError: 13:finding refs: could not find page token.>
Let's revert now, fix tests and apply it back.