Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Strokov <pstrokov@gitlab.com>2022-09-30 15:20:13 +0300
committerPavlo Strokov <pstrokov@gitlab.com>2022-10-17 15:38:16 +0300
commit292cc7f89fc56c15d09c2bd2c8d414f766d01589 (patch)
tree5f7d7ef756055eb65bdeb5d544571472c3c63bf3
parent17ffb55927e70c2541000a047a678029374afc7f (diff)
config: Simplify GetRepoPath implementation
It is not possible that GetPath method returns an empty result without an error. Condition removed to simplify the code as it won't ever be true.
-rw-r--r--internal/gitaly/config/locator.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/internal/gitaly/config/locator.go b/internal/gitaly/config/locator.go
index 8476bfa64..c9c2dfc97 100644
--- a/internal/gitaly/config/locator.go
+++ b/internal/gitaly/config/locator.go
@@ -45,10 +45,6 @@ func (l *configLocator) GetRepoPath(repo repository.GitRepo) (string, error) {
return "", err
}
- if repoPath == "" {
- return "", status.Errorf(codes.InvalidArgument, "GetRepoPath: empty repo path")
- }
-
if storage.IsGitDirectory(repoPath) {
return repoPath, nil
}