diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2022-09-30 15:20:13 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2022-10-17 15:38:16 +0300 |
commit | 292cc7f89fc56c15d09c2bd2c8d414f766d01589 (patch) | |
tree | 5f7d7ef756055eb65bdeb5d544571472c3c63bf3 | |
parent | 17ffb55927e70c2541000a047a678029374afc7f (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.go | 4 |
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 } |