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:
Diffstat (limited to 'internal/gitaly/service/commit/tree_entries.go')
-rw-r--r--internal/gitaly/service/commit/tree_entries.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/gitaly/service/commit/tree_entries.go b/internal/gitaly/service/commit/tree_entries.go
index 2a2489526..ceb52cdcf 100644
--- a/internal/gitaly/service/commit/tree_entries.go
+++ b/internal/gitaly/service/commit/tree_entries.go
@@ -8,6 +8,7 @@ import (
"github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus/ctxlogrus"
log "github.com/sirupsen/logrus"
+ gitalyerrors "gitlab.com/gitlab-org/gitaly/v15/internal/errors"
"gitlab.com/gitlab-org/gitaly/v15/internal/git"
"gitlab.com/gitlab-org/gitaly/v15/internal/git/catfile"
"gitlab.com/gitlab-org/gitaly/v15/internal/git/localrepo"
@@ -24,6 +25,9 @@ const (
)
func validateGetTreeEntriesRequest(in *gitalypb.GetTreeEntriesRequest) error {
+ if in.GetRepository() == nil {
+ return gitalyerrors.ErrEmptyRepository
+ }
if err := git.ValidateRevision(in.Revision); err != nil {
return err
}