diff options
Diffstat (limited to 'internal/gitaly/service/repository/info_attributes.go')
-rw-r--r-- | internal/gitaly/service/repository/info_attributes.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/gitaly/service/repository/info_attributes.go b/internal/gitaly/service/repository/info_attributes.go index 023fc28fd..cf2c86031 100644 --- a/internal/gitaly/service/repository/info_attributes.go +++ b/internal/gitaly/service/repository/info_attributes.go @@ -5,6 +5,8 @@ import ( "os" "path/filepath" + gitalyerrors "gitlab.com/gitlab-org/gitaly/v15/internal/errors" + "gitlab.com/gitlab-org/gitaly/v15/internal/helper" "gitlab.com/gitlab-org/gitaly/v15/proto/go/gitalypb" "gitlab.com/gitlab-org/gitaly/v15/streamio" "google.golang.org/grpc/codes" @@ -12,6 +14,9 @@ import ( ) func (s *server) GetInfoAttributes(in *gitalypb.GetInfoAttributesRequest, stream gitalypb.RepositoryService_GetInfoAttributesServer) error { + if in.GetRepository() == nil { + return helper.ErrInvalidArgument(gitalyerrors.ErrEmptyRepository) + } repoPath, err := s.locator.GetRepoPath(in.GetRepository()) if err != nil { return err |