blob: 41d207c8ee1ea2c0af8248f0856bab09298592e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
package repository
import (
"context"
"gitlab.com/gitlab-org/gitaly/v15/internal/helper"
"gitlab.com/gitlab-org/gitaly/v15/proto/go/gitalypb"
)
func (s *server) CreateRepository(ctx context.Context, req *gitalypb.CreateRepositoryRequest) (*gitalypb.CreateRepositoryResponse, error) {
if err := s.createRepository(
ctx,
req.GetRepository(),
func(repo *gitalypb.Repository) error {
// We do not want to seed the repository with any contents, so we just
// return directly.
return nil
},
withBranchName(string(req.GetDefaultBranch()))); err != nil {
return nil, helper.ErrInternalf("creating repository: %w", err)
}
return &gitalypb.CreateRepositoryResponse{}, nil
}
|