RepositoryExists error incorrectly reported when stat call fails
Gitaly is incorrectly reporting that a repository exists if a stat call checking for repository existence fails. The stat
call may fail with some other error than not found
as well, and this is not handled. This leads to confusion as it hides the real cause and returns an incorrect reason.
The same bug is repeated later in the function.
From https://gitlab.com/gitlab-org/gitaly/-/issues/5745#note_1712563156
Edited by Sami Hiltunen