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/list_last_commits_for_tree.go')
-rw-r--r--internal/gitaly/service/commit/list_last_commits_for_tree.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/gitaly/service/commit/list_last_commits_for_tree.go b/internal/gitaly/service/commit/list_last_commits_for_tree.go
index 7e1c35b83..ba3f6535e 100644
--- a/internal/gitaly/service/commit/list_last_commits_for_tree.go
+++ b/internal/gitaly/service/commit/list_last_commits_for_tree.go
@@ -6,6 +6,7 @@ import (
"sort"
"gitlab.com/gitlab-org/gitaly/v15/internal/command"
+ 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/log"
"gitlab.com/gitlab-org/gitaly/v15/internal/git/lstree"
@@ -139,6 +140,9 @@ func sendCommitsForTree(batch []*gitalypb.ListLastCommitsForTreeResponse_CommitF
}
func validateListLastCommitsForTreeRequest(in *gitalypb.ListLastCommitsForTreeRequest) error {
+ if in.GetRepository() == nil {
+ return gitalyerrors.ErrEmptyRepository
+ }
if err := git.ValidateRevision([]byte(in.Revision)); err != nil {
return err
}