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/service/diff/patch.go')
-rw-r--r--internal/service/diff/patch.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/service/diff/patch.go b/internal/service/diff/patch.go
index f8c02be6a..e4d6977fb 100644
--- a/internal/service/diff/patch.go
+++ b/internal/service/diff/patch.go
@@ -1,11 +1,17 @@
package diff
import (
+ "gitlab.com/gitlab-org/gitaly/internal/git"
+ "gitlab.com/gitlab-org/gitaly/internal/helper"
"gitlab.com/gitlab-org/gitaly/internal/rubyserver"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
)
func (s *server) CommitPatch(in *gitalypb.CommitPatchRequest, stream gitalypb.DiffService_CommitPatchServer) error {
+ if err := git.ValidateRevision(in.Revision); err != nil {
+ return helper.ErrInvalidArgument(err)
+ }
+
ctx := stream.Context()
client, err := s.DiffServiceClient(ctx)