diff options
author | James Fargher <proglottis@gmail.com> | 2021-01-11 03:55:20 +0300 |
---|---|---|
committer | James Fargher <proglottis@gmail.com> | 2021-01-11 03:55:20 +0300 |
commit | 026baa1ede00ef8691430e9b8a889acaba1f7545 (patch) | |
tree | 12fd8c6efdd5963b2e11da7fa56f2eddb3e7c46a /internal/helper | |
parent | 9ebe59be4f07dc2f5362e64c264fd4edc08ff57e (diff) | |
parent | 0fa3fe2309e4e42c790d46ccfad03aa43f020f9e (diff) |
Merge branch 'ps-cleanup-global-config-usage' into 'master'
Cleanup usages of the global config.Config variable
See merge request gitlab-org/gitaly!2969
Diffstat (limited to 'internal/helper')
-rw-r--r-- | internal/helper/repo.go | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/internal/helper/repo.go b/internal/helper/repo.go index 603c79319..b70e9c7a3 100644 --- a/internal/helper/repo.go +++ b/internal/helper/repo.go @@ -2,10 +2,7 @@ package helper import ( "gitlab.com/gitlab-org/gitaly/internal/git/repository" - "gitlab.com/gitlab-org/gitaly/internal/gitaly/config" "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) // RepoPathEqual compares if two repositories are in the same location @@ -14,18 +11,6 @@ func RepoPathEqual(a, b repository.GitRepo) bool { a.GetRelativePath() == b.GetRelativePath() } -// GetStorageByName will return the path for the storage, which is fetched by -// its key. An error is return if it cannot be found. -// Deprecated: please use storage.Locator to define the storage path. -func GetStorageByName(storageName string) (string, error) { - storagePath, ok := config.Config.StoragePath(storageName) - if !ok { - return "", status.Errorf(codes.InvalidArgument, "Storage can not be found by name '%s'", storageName) - } - - return storagePath, nil -} - // ProtoRepoFromRepo allows object pools and repository abstractions to be used // in places that require a concrete type func ProtoRepoFromRepo(repo repository.GitRepo) *gitalypb.Repository { |