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:
authorJohn Cai <jcai@gitlab.com>2019-12-02 22:26:31 +0300
committerJohn Cai <jcai@gitlab.com>2019-12-02 22:26:31 +0300
commit712a6072e8b95f989f54ecfb37cd721f96711d12 (patch)
tree7b4a900048208f8c9be67f28d6de3a11d71c1556
parenta7069266c73b4dba35f30a04d1dfd409681a55cc (diff)
parent6765eb9bc9ebf15076f6ea0fab9eee12b442c943 (diff)
Merge branch 'zj-remove-repo-conflict-header' into 'master'
Remove repository from ConflictFileHeader Closes #2106 See merge request gitlab-org/gitaly!1636
-rw-r--r--internal/service/conflicts/list_conflict_files_test.go18
-rw-r--r--proto/conflicts.proto2
-rw-r--r--proto/go/gitalypb/conflicts.pb.go104
-rw-r--r--ruby/lib/gitaly_server/conflicts_service.rb1
-rw-r--r--ruby/proto/gitaly/conflicts_pb.rb1
5 files changed, 57 insertions, 69 deletions
diff --git a/internal/service/conflicts/list_conflict_files_test.go b/internal/service/conflicts/list_conflict_files_test.go
index 9119c55ca..074234caa 100644
--- a/internal/service/conflicts/list_conflict_files_test.go
+++ b/internal/service/conflicts/list_conflict_files_test.go
@@ -65,21 +65,19 @@ end
expectedFiles := []*conflictFile{
{
header: &gitalypb.ConflictFileHeader{
- Repository: testRepo,
- CommitOid: ourCommitOid,
- OurMode: int32(0100644),
- OurPath: []byte("encoding/codagé"),
- TheirPath: []byte("encoding/codagé"),
+ CommitOid: ourCommitOid,
+ OurMode: int32(0100644),
+ OurPath: []byte("encoding/codagé"),
+ TheirPath: []byte("encoding/codagé"),
},
content: []byte(conflictContent1),
},
{
header: &gitalypb.ConflictFileHeader{
- Repository: testRepo,
- CommitOid: ourCommitOid,
- OurMode: int32(0100644),
- OurPath: []byte("files/ruby/feature.rb"),
- TheirPath: []byte("files/ruby/feature.rb"),
+ CommitOid: ourCommitOid,
+ OurMode: int32(0100644),
+ OurPath: []byte("files/ruby/feature.rb"),
+ TheirPath: []byte("files/ruby/feature.rb"),
},
content: []byte(conflictContent2),
},
diff --git a/proto/conflicts.proto b/proto/conflicts.proto
index 6409a38d5..1ff17c7fc 100644
--- a/proto/conflicts.proto
+++ b/proto/conflicts.proto
@@ -28,7 +28,7 @@ message ListConflictFilesRequest {
}
message ConflictFileHeader {
- Repository repository = 1;
+ reserved 1;
string commit_oid = 2;
bytes their_path = 3;
bytes our_path = 4;
diff --git a/proto/go/gitalypb/conflicts.pb.go b/proto/go/gitalypb/conflicts.pb.go
index 0dda32c33..a2373a0bb 100644
--- a/proto/go/gitalypb/conflicts.pb.go
+++ b/proto/go/gitalypb/conflicts.pb.go
@@ -80,14 +80,13 @@ func (m *ListConflictFilesRequest) GetTheirCommitOid() string {
}
type ConflictFileHeader struct {
- Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
- CommitOid string `protobuf:"bytes,2,opt,name=commit_oid,json=commitOid,proto3" json:"commit_oid,omitempty"`
- TheirPath []byte `protobuf:"bytes,3,opt,name=their_path,json=theirPath,proto3" json:"their_path,omitempty"`
- OurPath []byte `protobuf:"bytes,4,opt,name=our_path,json=ourPath,proto3" json:"our_path,omitempty"`
- OurMode int32 `protobuf:"varint,5,opt,name=our_mode,json=ourMode,proto3" json:"our_mode,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ CommitOid string `protobuf:"bytes,2,opt,name=commit_oid,json=commitOid,proto3" json:"commit_oid,omitempty"`
+ TheirPath []byte `protobuf:"bytes,3,opt,name=their_path,json=theirPath,proto3" json:"their_path,omitempty"`
+ OurPath []byte `protobuf:"bytes,4,opt,name=our_path,json=ourPath,proto3" json:"our_path,omitempty"`
+ OurMode int32 `protobuf:"varint,5,opt,name=our_mode,json=ourMode,proto3" json:"our_mode,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *ConflictFileHeader) Reset() { *m = ConflictFileHeader{} }
@@ -115,13 +114,6 @@ func (m *ConflictFileHeader) XXX_DiscardUnknown() {
var xxx_messageInfo_ConflictFileHeader proto.InternalMessageInfo
-func (m *ConflictFileHeader) GetRepository() *Repository {
- if m != nil {
- return m.Repository
- }
- return nil
-}
-
func (m *ConflictFileHeader) GetCommitOid() string {
if m != nil {
return m.CommitOid
@@ -496,47 +488,47 @@ func init() {
func init() { proto.RegisterFile("conflicts.proto", fileDescriptor_28fc8937e7d75862) }
var fileDescriptor_28fc8937e7d75862 = []byte{
- // 626 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xcf, 0x4e, 0xdb, 0x4c,
- 0x14, 0xc5, 0x19, 0x42, 0xfe, 0x5d, 0x0c, 0x84, 0xd1, 0xf7, 0x09, 0x63, 0x09, 0x61, 0x4c, 0x91,
- 0xdc, 0x4a, 0x4d, 0x20, 0xed, 0x1e, 0x29, 0x88, 0x16, 0x55, 0x45, 0xad, 0x5c, 0x75, 0xd3, 0x8d,
- 0xe5, 0xd8, 0x97, 0xc4, 0x95, 0xe3, 0x49, 0x67, 0xc6, 0x48, 0x79, 0x12, 0x76, 0x55, 0x1f, 0xa4,
- 0xef, 0xd2, 0xc7, 0xa8, 0xc4, 0xaa, 0xca, 0x8c, 0x6d, 0x02, 0x49, 0x68, 0xd5, 0xee, 0x92, 0x73,
- 0x7f, 0xbe, 0x73, 0xee, 0xdc, 0xa3, 0x81, 0xad, 0x90, 0xa5, 0x57, 0x49, 0x1c, 0x4a, 0xd1, 0x1e,
- 0x73, 0x26, 0x19, 0xad, 0x0d, 0x62, 0x19, 0x24, 0x13, 0xcb, 0x10, 0xc3, 0x80, 0x63, 0xa4, 0x55,
- 0xe7, 0x2b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xb6,
+ 0xd9, 0xb6, 0x56, 0x13, 0xb2, 0x1e, 0xeb, 0x77, 0xb7, 0x4e, 0xbd, 0x41, 0xda, 0xe5, 0x93, 0xce,
+ 0x89, 0x43, 0xfa, 0xc7, 0x5f, 0x67, 0x5f, 0xc4, 0xfe, 0xa0, 0x13, 0xb0, 0x71, 0x57, 0xff, 0x7c,
+ 0xcd, 0xf8, 0xb0, 0xab, 0x75, 0xba, 0xea, 0x85, 0xed, 0x0e, 0x59, 0xf6, 0x7f, 0x32, 0x18, 0xd4,
+ 0x14, 0xf4, 0xe6, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x52, 0xab, 0xf8, 0x46, 0x9d, 0x05, 0x00,
+ 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
diff --git a/ruby/lib/gitaly_server/conflicts_service.rb b/ruby/lib/gitaly_server/conflicts_service.rb
index 737d2118d..f0e5a7cef 100644
--- a/ruby/lib/gitaly_server/conflicts_service.rb
+++ b/ruby/lib/gitaly_server/conflicts_service.rb
@@ -75,7 +75,6 @@ module GitalyServer
def conflict_file_header(file)
Gitaly::ConflictFileHeader.new(
- repository: file.repository.gitaly_repository,
commit_oid: file.commit_oid,
their_path: file.their_path.b,
our_path: file.our_path.b,
diff --git a/ruby/proto/gitaly/conflicts_pb.rb b/ruby/proto/gitaly/conflicts_pb.rb
index 4d94a9ecc..8ab2e6c15 100644
--- a/ruby/proto/gitaly/conflicts_pb.rb
+++ b/ruby/proto/gitaly/conflicts_pb.rb
@@ -11,7 +11,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :their_commit_oid, :string, 3
end
add_message "gitaly.ConflictFileHeader" do
- optional :repository, :message, 1, "gitaly.Repository"
optional :commit_oid, :string, 2
optional :their_path, :bytes, 3
optional :our_path, :bytes, 4