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:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2021-08-20 10:07:39 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-08-20 13:18:32 +0300
commit9f217d2ba58cc4e39f6e51b4c175ea914245a625 (patch)
treed425155a2f6f7d30013bc767b0422eab0142b3f2
parent75f19520594f9e637e81559b59df610c1b57c4ac (diff)
remote: Remove support for on-disk remotes in FindRemoteRootRef
On-disk remotes have been deprecated, and no upstream callers remain which use them anymore. Remove support for them in FindRemoteRootRef by dropping the "remote" parameter. Changelog: removed
-rw-r--r--internal/gitaly/service/remote/find_remote_root_ref.go33
-rw-r--r--internal/gitaly/service/remote/find_remote_root_ref_test.go46
-rw-r--r--proto/go/gitalypb/remote.pb.go128
-rw-r--r--proto/remote.proto8
-rw-r--r--ruby/proto/gitaly/remote_pb.rb1
5 files changed, 80 insertions, 136 deletions
diff --git a/internal/gitaly/service/remote/find_remote_root_ref.go b/internal/gitaly/service/remote/find_remote_root_ref.go
index dc4302783..fb2f0adf0 100644
--- a/internal/gitaly/service/remote/find_remote_root_ref.go
+++ b/internal/gitaly/service/remote/find_remote_root_ref.go
@@ -16,28 +16,22 @@ import (
const headPrefix = "HEAD branch: "
func (s *server) findRemoteRootRef(ctx context.Context, request *gitalypb.FindRemoteRootRefRequest) (string, error) {
- remoteName := request.Remote // nolint:staticcheck
- var config []git.ConfigPair
-
- if request.RemoteUrl != "" {
- remoteName = "inmemory"
- config = []git.ConfigPair{
- {Key: "remote.inmemory.url", Value: request.RemoteUrl},
- }
+ config := []git.ConfigPair{
+ {Key: "remote.inmemory.url", Value: request.RemoteUrl},
+ }
- if authHeader := request.GetHttpAuthorizationHeader(); authHeader != "" {
- config = append(config, git.ConfigPair{
- Key: fmt.Sprintf("http.%s.extraHeader", request.RemoteUrl),
- Value: "Authorization: " + authHeader,
- })
- }
+ if authHeader := request.GetHttpAuthorizationHeader(); authHeader != "" {
+ config = append(config, git.ConfigPair{
+ Key: fmt.Sprintf("http.%s.extraHeader", request.RemoteUrl),
+ Value: "Authorization: " + authHeader,
+ })
}
cmd, err := s.gitCmdFactory.New(ctx, request.Repository,
git.SubSubCmd{
Name: "remote",
Action: "show",
- Args: []string{remoteName},
+ Args: []string{"inmemory"},
},
git.WithRefTxHook(ctx, request.Repository, s.cfg),
git.WithConfigEnv(config...),
@@ -72,13 +66,8 @@ func (s *server) findRemoteRootRef(ctx context.Context, request *gitalypb.FindRe
// FindRemoteRootRef queries the remote to determine its HEAD
func (s *server) FindRemoteRootRef(ctx context.Context, in *gitalypb.FindRemoteRootRefRequest) (*gitalypb.FindRemoteRootRefResponse, error) {
- //nolint:staticcheck // GetRemote() is deprecated
- if in.GetRemote() == "" && in.GetRemoteUrl() == "" {
- return nil, status.Error(codes.InvalidArgument, "got neither remote name nor URL")
- }
- //nolint:staticcheck // GetRemote() is deprecated
- if in.GetRemote() != "" && in.GetRemoteUrl() != "" {
- return nil, status.Error(codes.InvalidArgument, "got remote name and URL")
+ if in.GetRemoteUrl() == "" {
+ return nil, status.Error(codes.InvalidArgument, "missing remote URL")
}
if in.Repository == nil {
return nil, status.Error(codes.InvalidArgument, "missing repository")
diff --git a/internal/gitaly/service/remote/find_remote_root_ref_test.go b/internal/gitaly/service/remote/find_remote_root_ref_test.go
index 0e352b85d..8dc8e1406 100644
--- a/internal/gitaly/service/remote/find_remote_root_ref_test.go
+++ b/internal/gitaly/service/remote/find_remote_root_ref_test.go
@@ -24,10 +24,6 @@ func TestFindRemoteRootRefSuccess(t *testing.T) {
request *gitalypb.FindRemoteRootRefRequest
}{
{
- desc: "with remote name",
- request: &gitalypb.FindRemoteRootRefRequest{Repository: repo, Remote: "origin"},
- },
- {
desc: "with remote URL",
request: &gitalypb.FindRemoteRootRefRequest{Repository: repo, RemoteUrl: originURL},
},
@@ -66,14 +62,12 @@ func TestFindRemoteRootRefWithUnbornRemoteHead(t *testing.T) {
ctx, cancel := testhelper.Context()
defer cancel()
- for _, request := range []*gitalypb.FindRemoteRootRefRequest{
- &gitalypb.FindRemoteRootRefRequest{Repository: remoteRepo, Remote: "foo"},
- &gitalypb.FindRemoteRootRefRequest{Repository: remoteRepo, RemoteUrl: "file://" + clientRepoPath},
- } {
- response, err := client.FindRemoteRootRef(ctx, request)
- testassert.GrpcEqualErr(t, status.Error(codes.NotFound, "no remote HEAD found"), err)
- require.Nil(t, response)
- }
+ response, err := client.FindRemoteRootRef(ctx, &gitalypb.FindRemoteRootRefRequest{
+ Repository: remoteRepo,
+ RemoteUrl: "file://" + clientRepoPath},
+ )
+ testassert.GrpcEqualErr(t, status.Error(codes.NotFound, "no remote HEAD found"), err)
+ require.Nil(t, response)
}
func TestFindRemoteRootRefFailedDueToValidation(t *testing.T) {
@@ -91,7 +85,7 @@ func TestFindRemoteRootRefFailedDueToValidation(t *testing.T) {
desc: "Invalid repository",
request: &gitalypb.FindRemoteRootRefRequest{
Repository: invalidRepo,
- Remote: "remote-name",
+ RemoteUrl: "remote-url",
},
expectedErr: []error{
status.Error(codes.InvalidArgument, "GetStorageByName: no such storage: \"fake\""),
@@ -101,7 +95,7 @@ func TestFindRemoteRootRefFailedDueToValidation(t *testing.T) {
{
desc: "Repository is nil",
request: &gitalypb.FindRemoteRootRefRequest{
- Remote: "remote-name",
+ RemoteUrl: "remote-url",
},
expectedErr: []error{
status.Error(codes.InvalidArgument, "missing repository"),
@@ -109,23 +103,12 @@ func TestFindRemoteRootRefFailedDueToValidation(t *testing.T) {
},
},
{
- desc: "Remote name and URL is empty",
- request: &gitalypb.FindRemoteRootRefRequest{
- Repository: repo,
- },
- expectedErr: []error{
- status.Error(codes.InvalidArgument, "got neither remote name nor URL"),
- },
- },
- {
- desc: "Remote name and URL is set",
+ desc: "Remote URL is empty",
request: &gitalypb.FindRemoteRootRefRequest{
Repository: repo,
- Remote: "remote-name",
- RemoteUrl: "remote-url",
},
expectedErr: []error{
- status.Error(codes.InvalidArgument, "got remote name and URL"),
+ status.Error(codes.InvalidArgument, "missing remote URL"),
},
},
}
@@ -149,15 +132,6 @@ func TestFindRemoteRootRefFailedDueToInvalidRemote(t *testing.T) {
t.Parallel()
_, repo, _, client := setupRemoteService(t)
- t.Run("invalid remote name", func(t *testing.T) {
- request := &gitalypb.FindRemoteRootRefRequest{Repository: repo, Remote: "invalid"}
- ctx, cancel := testhelper.Context()
- defer cancel()
-
- _, err := client.FindRemoteRootRef(ctx, request)
- testhelper.RequireGrpcError(t, err, codes.Internal)
- })
-
t.Run("invalid remote URL", func(t *testing.T) {
fakeRepoDir := testhelper.TempDir(t)
diff --git a/proto/go/gitalypb/remote.pb.go b/proto/go/gitalypb/remote.pb.go
index f05d4ecc8..8f3eaafdb 100644
--- a/proto/go/gitalypb/remote.pb.go
+++ b/proto/go/gitalypb/remote.pb.go
@@ -391,13 +391,6 @@ type FindRemoteRootRefRequest struct {
// a remote name is given, then this is the repository in which the remote
// will be looked up.
Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
- // Remote is the name of the remote of which the root reference shall be
- // looked up. The remote must have been created before this call. This
- // parameter is deprecated in favor of `RemoteUrl`, see
- // https://gitlab.com/gitlab-org/gitaly/-/issues/1773.
- //
- // Deprecated: Do not use.
- Remote string `protobuf:"bytes,2,opt,name=remote,proto3" json:"remote,omitempty"`
// RemoteUrl specifies the remote repository URL which should be fetched from.
RemoteUrl string `protobuf:"bytes,3,opt,name=remote_url,json=remoteUrl,proto3" json:"remote_url,omitempty"`
// HttpAuthorizationHeader is the HTTP header which should be added to the
@@ -444,14 +437,6 @@ func (x *FindRemoteRootRefRequest) GetRepository() *Repository {
return nil
}
-// Deprecated: Do not use.
-func (x *FindRemoteRootRefRequest) GetRemote() string {
- if x != nil {
- return x.Remote
- }
- return ""
-}
-
func (x *FindRemoteRootRefRequest) GetRemoteUrl() string {
if x != nil {
return x.RemoteUrl
@@ -790,69 +775,68 @@ var file_remote_proto_rawDesc = []byte{
0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73,
0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73,
- 0x22, 0xcb, 0x01, 0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52,
+ 0x22, 0xbd, 0x01, 0x0a, 0x18, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52,
0x6f, 0x6f, 0x74, 0x52, 0x65, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a,
0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x12, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73,
0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x04, 0x98, 0xc6, 0x2c, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x70,
- 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74,
- 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x72, 0x65, 0x6d,
- 0x6f, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x75, 0x72,
- 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x55,
- 0x72, 0x6c, 0x12, 0x3a, 0x0a, 0x19, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f,
- 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x68, 0x74, 0x74, 0x70, 0x41, 0x75, 0x74, 0x68, 0x6f,
- 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x2d,
- 0x0a, 0x19, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74,
- 0x52, 0x65, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x72,
- 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x22, 0x4e, 0x0a,
- 0x12, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72,
- 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79,
- 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x04, 0x98, 0xc6, 0x2c,
- 0x01, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x22, 0xa9, 0x01,
- 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x73,
- 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e,
- 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x6f,
- 0x74, 0x65, 0x73, 0x1a, 0x54, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x12, 0x12, 0x0a,
- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
- 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x65, 0x74, 0x63, 0x68, 0x55, 0x72, 0x6c, 0x12, 0x19,
- 0x0a, 0x08, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x07, 0x70, 0x75, 0x73, 0x68, 0x55, 0x72, 0x6c, 0x32, 0xad, 0x03, 0x0a, 0x0d, 0x52, 0x65,
- 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x46,
- 0x65, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x6d, 0x6f,
- 0x74, 0x65, 0x12, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x65, 0x74, 0x63,
- 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e,
- 0x46, 0x65, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x6d,
- 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28,
- 0x02, 0x08, 0x01, 0x12, 0x65, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6d,
- 0x6f, 0x74, 0x65, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x61,
- 0x6c, 0x79, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d,
- 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67,
- 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6d, 0x6f,
- 0x74, 0x65, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x28, 0x01, 0x12, 0x6b, 0x0a, 0x14, 0x46, 0x69,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x74,
+ 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x6d,
+ 0x6f, 0x74, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x3a, 0x0a, 0x19, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x61,
+ 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x61,
+ 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x68, 0x74, 0x74, 0x70, 0x41,
+ 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x61, 0x64,
+ 0x65, 0x72, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65,
+ 0x22, 0x2d, 0x0a, 0x19, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x6f,
+ 0x6f, 0x74, 0x52, 0x65, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a,
+ 0x03, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x22,
+ 0x4e, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x69, 0x74, 0x61,
+ 0x6c, 0x79, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x04, 0x98,
+ 0xc6, 0x2c, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x22,
+ 0xa9, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x6f, 0x74,
+ 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c,
+ 0x79, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x07, 0x72, 0x65,
+ 0x6d, 0x6f, 0x74, 0x65, 0x73, 0x1a, 0x54, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x12,
+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x75, 0x72, 0x6c,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x65, 0x74, 0x63, 0x68, 0x55, 0x72, 0x6c,
+ 0x12, 0x19, 0x0a, 0x08, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x07, 0x70, 0x75, 0x73, 0x68, 0x55, 0x72, 0x6c, 0x32, 0xad, 0x03, 0x0a, 0x0d,
+ 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a,
+ 0x13, 0x46, 0x65, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65,
+ 0x6d, 0x6f, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x65,
+ 0x74, 0x63, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x6d, 0x6f, 0x74,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c,
+ 0x79, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52,
+ 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa,
+ 0x97, 0x28, 0x02, 0x08, 0x01, 0x12, 0x65, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52,
+ 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x21, 0x2e, 0x67, 0x69,
+ 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74,
+ 0x65, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22,
+ 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65,
+ 0x6d, 0x6f, 0x74, 0x65, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x28, 0x01, 0x12, 0x6b, 0x0a, 0x14,
+ 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x12, 0x23, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x69,
0x6e, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
- 0x72, 0x79, 0x12, 0x23, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x69, 0x6e, 0x64,
- 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79,
- 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73,
- 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xfa,
- 0x97, 0x28, 0x04, 0x08, 0x02, 0x10, 0x02, 0x12, 0x60, 0x0a, 0x11, 0x46, 0x69, 0x6e, 0x64, 0x52,
- 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x66, 0x12, 0x20, 0x2e, 0x67,
- 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65,
- 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21,
+ 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x67, 0x69, 0x74, 0x61,
+ 0x6c, 0x79, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+ 0x08, 0xfa, 0x97, 0x28, 0x04, 0x08, 0x02, 0x10, 0x02, 0x12, 0x60, 0x0a, 0x11, 0x46, 0x69, 0x6e,
+ 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x66, 0x12, 0x20,
0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x6d, 0x6f,
- 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74,
- 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2d, 0x6f,
- 0x72, 0x67, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2f, 0x76, 0x31, 0x34, 0x2f, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x70, 0x62, 0x62,
- 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65,
+ 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x42, 0x34, 0x5a, 0x32, 0x67,
+ 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62,
+ 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2f, 0x76, 0x31, 0x34, 0x2f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x70,
+ 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/proto/remote.proto b/proto/remote.proto
index 8ee63e5ef..7d43ca6e8 100644
--- a/proto/remote.proto
+++ b/proto/remote.proto
@@ -114,16 +114,14 @@ message FindRemoteRootRefRequest {
// a remote name is given, then this is the repository in which the remote
// will be looked up.
Repository repository = 1 [(target_repository)=true];
- // Remote is the name of the remote of which the root reference shall be
- // looked up. The remote must have been created before this call. This
- // parameter is deprecated in favor of `RemoteUrl`, see
- // https://gitlab.com/gitlab-org/gitaly/-/issues/1773.
- string remote = 2 [deprecated=true];
// RemoteUrl specifies the remote repository URL which should be fetched from.
string remote_url = 3;
// HttpAuthorizationHeader is the HTTP header which should be added to the
// request in order to authenticate against the repository.
string http_authorization_header = 4;
+
+ reserved 2;
+ reserved "remote";
}
// FindRemoteRootRefResponse represents the response for the FindRemoteRootRef
diff --git a/ruby/proto/gitaly/remote_pb.rb b/ruby/proto/gitaly/remote_pb.rb
index ece434a5f..b37ab7488 100644
--- a/ruby/proto/gitaly/remote_pb.rb
+++ b/ruby/proto/gitaly/remote_pb.rb
@@ -38,7 +38,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
end
add_message "gitaly.FindRemoteRootRefRequest" do
optional :repository, :message, 1, "gitaly.Repository"
- optional :remote, :string, 2
optional :remote_url, :string, 3
optional :http_authorization_header, :string, 4
end