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/ssh/upload_archive.go')
-rw-r--r--internal/gitaly/service/ssh/upload_archive.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/gitaly/service/ssh/upload_archive.go b/internal/gitaly/service/ssh/upload_archive.go
index 3dc362a91..c99d09f23 100644
--- a/internal/gitaly/service/ssh/upload_archive.go
+++ b/internal/gitaly/service/ssh/upload_archive.go
@@ -6,6 +6,7 @@ import (
"sync"
"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/pktline"
"gitlab.com/gitlab-org/gitaly/v15/internal/helper"
@@ -98,6 +99,9 @@ func (s *server) sshUploadArchive(stream gitalypb.SSHService_SSHUploadArchiveSer
}
func validateFirstUploadArchiveRequest(req *gitalypb.SSHUploadArchiveRequest) error {
+ if req.GetRepository() == nil {
+ return gitalyerrors.ErrEmptyRepository
+ }
if req.Stdin != nil {
return fmt.Errorf("non-empty stdin in first request")
}