diff options
Diffstat (limited to 'internal/gitaly/service/operations/cherry_pick.go')
-rw-r--r-- | internal/gitaly/service/operations/cherry_pick.go | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/internal/gitaly/service/operations/cherry_pick.go b/internal/gitaly/service/operations/cherry_pick.go index 95526b2f5..64c024e65 100644 --- a/internal/gitaly/service/operations/cherry_pick.go +++ b/internal/gitaly/service/operations/cherry_pick.go @@ -8,11 +8,8 @@ import ( "github.com/golang/protobuf/ptypes" "gitlab.com/gitlab-org/gitaly/internal/git" - "gitlab.com/gitlab-org/gitaly/internal/git/localrepo" "gitlab.com/gitlab-org/gitaly/internal/git2go" - "gitlab.com/gitlab-org/gitaly/internal/gitaly/rubyserver" "gitlab.com/gitlab-org/gitaly/internal/helper" - "gitlab.com/gitlab-org/gitaly/internal/metadata/featureflag" "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -23,30 +20,12 @@ func (s *Server) UserCherryPick(ctx context.Context, req *gitalypb.UserCherryPic return nil, status.Errorf(codes.InvalidArgument, "UserCherryPick: %v", err) } - if featureflag.IsEnabled(ctx, featureflag.GoUserCherryPick) { - return s.userCherryPick(ctx, req) - } - - client, err := s.ruby.OperationServiceClient(ctx) - if err != nil { - return nil, err - } - - clientCtx, err := rubyserver.SetHeaders(ctx, s.locator, req.GetRepository()) - if err != nil { - return nil, err - } - - return client.UserCherryPick(clientCtx, req) -} - -func (s *Server) userCherryPick(ctx context.Context, req *gitalypb.UserCherryPickRequest) (*gitalypb.UserCherryPickResponse, error) { startRevision, err := s.fetchStartRevision(ctx, req) if err != nil { return nil, err } - localRepo := localrepo.New(s.gitCmdFactory, req.Repository, s.cfg) + localRepo := s.localrepo(req.GetRepository()) repoHadBranches, err := localRepo.HasBranches(ctx) if err != nil { return nil, err |