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/repository/create_fork.go')
-rw-r--r--internal/gitaly/service/repository/create_fork.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/gitaly/service/repository/create_fork.go b/internal/gitaly/service/repository/create_fork.go
index 7566a9344..36265ed84 100644
--- a/internal/gitaly/service/repository/create_fork.go
+++ b/internal/gitaly/service/repository/create_fork.go
@@ -6,6 +6,7 @@ import (
"os"
"strings"
+ gitalyerrors "gitlab.com/gitlab-org/gitaly/v15/internal/errors"
"gitlab.com/gitlab-org/gitaly/v15/internal/git"
"gitlab.com/gitlab-org/gitaly/v15/internal/helper"
"gitlab.com/gitlab-org/gitaly/v15/proto/go/gitalypb"
@@ -21,7 +22,7 @@ func (s *server) CreateFork(ctx context.Context, req *gitalypb.CreateForkRequest
return nil, status.Errorf(codes.InvalidArgument, "CreateFork: empty SourceRepository")
}
if targetRepository == nil {
- return nil, status.Errorf(codes.InvalidArgument, "CreateFork: empty Repository")
+ return nil, helper.ErrInvalidArgumentf("CreateFork: %w", gitalyerrors.ErrEmptyRepository)
}
if err := s.createRepository(ctx, targetRepository, func(repo *gitalypb.Repository) error {