diff --git a/gitaly.proto b/gitaly.proto index 3d3345ee8c5d9a8de71984f7fac7a60b3a2a5673..0fe89487e4aff224ab37cfe2f01bb4dd16eececa 100644 --- a/gitaly.proto +++ b/gitaly.proto @@ -21,6 +21,8 @@ service Ref { rpc FindDefaultBranchName(FindDefaultBranchNameRequest) returns (FindDefaultBranchNameResponse) {} rpc FindAllBranchNames(FindAllBranchNamesRequest) returns (stream FindAllBranchNamesResponse) {} rpc FindAllTagNames(FindAllTagNamesRequest) returns (stream FindAllTagNamesResponse) {} + // Find a Ref matching the given constraints. Response may be empty. + rpc FindRefName(FindRefNameRequest) returns (FindRefNameResponse) {} } service Diff { @@ -36,6 +38,14 @@ message InfoRefsReceivePackRequest { Repository repository = 1; } +service Commit { + rpc CommitIsAncestor(CommitIsAncestorRequest) returns (CommitIsAncestorResponse) {} +} + +message CommitIsAncestorResponse { + bool value = 1; +} + message InfoRefsUploadPackResponse { bytes data = 1; } @@ -50,6 +60,25 @@ message PostReceiveRequest { message PostReceiveResponse {} +message FindRefNameRequest { + Repository repository = 1; + // Require that the resulting ref contains this commit as an ancestor + string commit_id = 2; + // Example prefix: "refs/heads/". Type bytes because that is the type of ref names. + bytes prefix = 3; +} + +message FindRefNameResponse { + // Example name: "refs/heads/master". Cannot assume UTF8, so the type is bytes. + bytes name = 1; +} + +message CommitIsAncestorRequest { + Repository repository = 1; + string ancestor_id = 2; + string child_id = 3; +} + message FindDefaultBranchNameRequest { Repository repository = 1; } diff --git a/go/gitaly.pb.go b/go/gitaly.pb.go index 06f3fd66dce8ce9cd47df5c00f44fbdd0e35d694..fbecd02afec06cb6db8682bbc57d944844012a5b 100644 --- a/go/gitaly.pb.go +++ b/go/gitaly.pb.go @@ -13,10 +13,14 @@ It is generated from these files: It has these top-level messages: InfoRefsUploadPackRequest InfoRefsReceivePackRequest + CommitIsAncestorResponse InfoRefsUploadPackResponse InfoRefsReceivePackResponse PostReceiveRequest PostReceiveResponse + FindRefNameRequest + FindRefNameResponse + CommitIsAncestorRequest FindDefaultBranchNameRequest FindAllBranchNamesRequest FindAllTagNamesRequest @@ -86,6 +90,22 @@ func (m *InfoRefsReceivePackRequest) GetRepository() *Repository { return nil } +type CommitIsAncestorResponse struct { + Value bool `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` +} + +func (m *CommitIsAncestorResponse) Reset() { *m = CommitIsAncestorResponse{} } +func (m *CommitIsAncestorResponse) String() string { return proto.CompactTextString(m) } +func (*CommitIsAncestorResponse) ProtoMessage() {} +func (*CommitIsAncestorResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +func (m *CommitIsAncestorResponse) GetValue() bool { + if m != nil { + return m.Value + } + return false +} + type InfoRefsUploadPackResponse struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` } @@ -93,7 +113,7 @@ type InfoRefsUploadPackResponse struct { func (m *InfoRefsUploadPackResponse) Reset() { *m = InfoRefsUploadPackResponse{} } func (m *InfoRefsUploadPackResponse) String() string { return proto.CompactTextString(m) } func (*InfoRefsUploadPackResponse) ProtoMessage() {} -func (*InfoRefsUploadPackResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (*InfoRefsUploadPackResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } func (m *InfoRefsUploadPackResponse) GetData() []byte { if m != nil { @@ -109,7 +129,7 @@ type InfoRefsReceivePackResponse struct { func (m *InfoRefsReceivePackResponse) Reset() { *m = InfoRefsReceivePackResponse{} } func (m *InfoRefsReceivePackResponse) String() string { return proto.CompactTextString(m) } func (*InfoRefsReceivePackResponse) ProtoMessage() {} -func (*InfoRefsReceivePackResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (*InfoRefsReceivePackResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } func (m *InfoRefsReceivePackResponse) GetData() []byte { if m != nil { @@ -125,7 +145,7 @@ type PostReceiveRequest struct { func (m *PostReceiveRequest) Reset() { *m = PostReceiveRequest{} } func (m *PostReceiveRequest) String() string { return proto.CompactTextString(m) } func (*PostReceiveRequest) ProtoMessage() {} -func (*PostReceiveRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (*PostReceiveRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } func (m *PostReceiveRequest) GetRepository() *Repository { if m != nil { @@ -140,7 +160,90 @@ type PostReceiveResponse struct { func (m *PostReceiveResponse) Reset() { *m = PostReceiveResponse{} } func (m *PostReceiveResponse) String() string { return proto.CompactTextString(m) } func (*PostReceiveResponse) ProtoMessage() {} -func (*PostReceiveResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +func (*PostReceiveResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + +type FindRefNameRequest struct { + Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"` + // Require that the resulting ref contains this commit as an ancestor + CommitId string `protobuf:"bytes,2,opt,name=commit_id,json=commitId" json:"commit_id,omitempty"` + // Example prefix: "refs/heads/". Type bytes because that is the type of ref names. + Prefix []byte `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix,omitempty"` +} + +func (m *FindRefNameRequest) Reset() { *m = FindRefNameRequest{} } +func (m *FindRefNameRequest) String() string { return proto.CompactTextString(m) } +func (*FindRefNameRequest) ProtoMessage() {} +func (*FindRefNameRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } + +func (m *FindRefNameRequest) GetRepository() *Repository { + if m != nil { + return m.Repository + } + return nil +} + +func (m *FindRefNameRequest) GetCommitId() string { + if m != nil { + return m.CommitId + } + return "" +} + +func (m *FindRefNameRequest) GetPrefix() []byte { + if m != nil { + return m.Prefix + } + return nil +} + +type FindRefNameResponse struct { + // Example name: "refs/heads/master". Cannot assume UTF8, so the type is bytes. + Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *FindRefNameResponse) Reset() { *m = FindRefNameResponse{} } +func (m *FindRefNameResponse) String() string { return proto.CompactTextString(m) } +func (*FindRefNameResponse) ProtoMessage() {} +func (*FindRefNameResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } + +func (m *FindRefNameResponse) GetName() []byte { + if m != nil { + return m.Name + } + return nil +} + +type CommitIsAncestorRequest struct { + Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"` + AncestorId string `protobuf:"bytes,2,opt,name=ancestor_id,json=ancestorId" json:"ancestor_id,omitempty"` + ChildId string `protobuf:"bytes,3,opt,name=child_id,json=childId" json:"child_id,omitempty"` +} + +func (m *CommitIsAncestorRequest) Reset() { *m = CommitIsAncestorRequest{} } +func (m *CommitIsAncestorRequest) String() string { return proto.CompactTextString(m) } +func (*CommitIsAncestorRequest) ProtoMessage() {} +func (*CommitIsAncestorRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } + +func (m *CommitIsAncestorRequest) GetRepository() *Repository { + if m != nil { + return m.Repository + } + return nil +} + +func (m *CommitIsAncestorRequest) GetAncestorId() string { + if m != nil { + return m.AncestorId + } + return "" +} + +func (m *CommitIsAncestorRequest) GetChildId() string { + if m != nil { + return m.ChildId + } + return "" +} type FindDefaultBranchNameRequest struct { Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"` @@ -149,7 +252,7 @@ type FindDefaultBranchNameRequest struct { func (m *FindDefaultBranchNameRequest) Reset() { *m = FindDefaultBranchNameRequest{} } func (m *FindDefaultBranchNameRequest) String() string { return proto.CompactTextString(m) } func (*FindDefaultBranchNameRequest) ProtoMessage() {} -func (*FindDefaultBranchNameRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (*FindDefaultBranchNameRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } func (m *FindDefaultBranchNameRequest) GetRepository() *Repository { if m != nil { @@ -165,7 +268,7 @@ type FindAllBranchNamesRequest struct { func (m *FindAllBranchNamesRequest) Reset() { *m = FindAllBranchNamesRequest{} } func (m *FindAllBranchNamesRequest) String() string { return proto.CompactTextString(m) } func (*FindAllBranchNamesRequest) ProtoMessage() {} -func (*FindAllBranchNamesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (*FindAllBranchNamesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } func (m *FindAllBranchNamesRequest) GetRepository() *Repository { if m != nil { @@ -181,7 +284,7 @@ type FindAllTagNamesRequest struct { func (m *FindAllTagNamesRequest) Reset() { *m = FindAllTagNamesRequest{} } func (m *FindAllTagNamesRequest) String() string { return proto.CompactTextString(m) } func (*FindAllTagNamesRequest) ProtoMessage() {} -func (*FindAllTagNamesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (*FindAllTagNamesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } func (m *FindAllTagNamesRequest) GetRepository() *Repository { if m != nil { @@ -197,7 +300,7 @@ type FindDefaultBranchNameResponse struct { func (m *FindDefaultBranchNameResponse) Reset() { *m = FindDefaultBranchNameResponse{} } func (m *FindDefaultBranchNameResponse) String() string { return proto.CompactTextString(m) } func (*FindDefaultBranchNameResponse) ProtoMessage() {} -func (*FindDefaultBranchNameResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +func (*FindDefaultBranchNameResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } func (m *FindDefaultBranchNameResponse) GetName() []byte { if m != nil { @@ -213,7 +316,7 @@ type FindAllBranchNamesResponse struct { func (m *FindAllBranchNamesResponse) Reset() { *m = FindAllBranchNamesResponse{} } func (m *FindAllBranchNamesResponse) String() string { return proto.CompactTextString(m) } func (*FindAllBranchNamesResponse) ProtoMessage() {} -func (*FindAllBranchNamesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (*FindAllBranchNamesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } func (m *FindAllBranchNamesResponse) GetNames() [][]byte { if m != nil { @@ -229,7 +332,7 @@ type FindAllTagNamesResponse struct { func (m *FindAllTagNamesResponse) Reset() { *m = FindAllTagNamesResponse{} } func (m *FindAllTagNamesResponse) String() string { return proto.CompactTextString(m) } func (*FindAllTagNamesResponse) ProtoMessage() {} -func (*FindAllTagNamesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +func (*FindAllTagNamesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } func (m *FindAllTagNamesResponse) GetNames() [][]byte { if m != nil { @@ -247,7 +350,7 @@ type CommitDiffRequest struct { func (m *CommitDiffRequest) Reset() { *m = CommitDiffRequest{} } func (m *CommitDiffRequest) String() string { return proto.CompactTextString(m) } func (*CommitDiffRequest) ProtoMessage() {} -func (*CommitDiffRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } +func (*CommitDiffRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } func (m *CommitDiffRequest) GetRepository() *Repository { if m != nil { @@ -286,7 +389,7 @@ type CommitDiffResponse struct { func (m *CommitDiffResponse) Reset() { *m = CommitDiffResponse{} } func (m *CommitDiffResponse) String() string { return proto.CompactTextString(m) } func (*CommitDiffResponse) ProtoMessage() {} -func (*CommitDiffResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } +func (*CommitDiffResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } func (m *CommitDiffResponse) GetFromPath() []byte { if m != nil { @@ -347,10 +450,14 @@ func (m *CommitDiffResponse) GetRawChunks() [][]byte { func init() { proto.RegisterType((*InfoRefsUploadPackRequest)(nil), "gitaly.InfoRefsUploadPackRequest") proto.RegisterType((*InfoRefsReceivePackRequest)(nil), "gitaly.InfoRefsReceivePackRequest") + proto.RegisterType((*CommitIsAncestorResponse)(nil), "gitaly.CommitIsAncestorResponse") proto.RegisterType((*InfoRefsUploadPackResponse)(nil), "gitaly.InfoRefsUploadPackResponse") proto.RegisterType((*InfoRefsReceivePackResponse)(nil), "gitaly.InfoRefsReceivePackResponse") proto.RegisterType((*PostReceiveRequest)(nil), "gitaly.PostReceiveRequest") proto.RegisterType((*PostReceiveResponse)(nil), "gitaly.PostReceiveResponse") + proto.RegisterType((*FindRefNameRequest)(nil), "gitaly.FindRefNameRequest") + proto.RegisterType((*FindRefNameResponse)(nil), "gitaly.FindRefNameResponse") + proto.RegisterType((*CommitIsAncestorRequest)(nil), "gitaly.CommitIsAncestorRequest") proto.RegisterType((*FindDefaultBranchNameRequest)(nil), "gitaly.FindDefaultBranchNameRequest") proto.RegisterType((*FindAllBranchNamesRequest)(nil), "gitaly.FindAllBranchNamesRequest") proto.RegisterType((*FindAllTagNamesRequest)(nil), "gitaly.FindAllTagNamesRequest") @@ -594,6 +701,8 @@ type RefClient interface { FindDefaultBranchName(ctx context.Context, in *FindDefaultBranchNameRequest, opts ...grpc.CallOption) (*FindDefaultBranchNameResponse, error) FindAllBranchNames(ctx context.Context, in *FindAllBranchNamesRequest, opts ...grpc.CallOption) (Ref_FindAllBranchNamesClient, error) FindAllTagNames(ctx context.Context, in *FindAllTagNamesRequest, opts ...grpc.CallOption) (Ref_FindAllTagNamesClient, error) + // Find a Ref matching the given constraints. Response may be empty. + FindRefName(ctx context.Context, in *FindRefNameRequest, opts ...grpc.CallOption) (*FindRefNameResponse, error) } type refClient struct { @@ -677,12 +786,23 @@ func (x *refFindAllTagNamesClient) Recv() (*FindAllTagNamesResponse, error) { return m, nil } +func (c *refClient) FindRefName(ctx context.Context, in *FindRefNameRequest, opts ...grpc.CallOption) (*FindRefNameResponse, error) { + out := new(FindRefNameResponse) + err := grpc.Invoke(ctx, "/gitaly.Ref/FindRefName", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // Server API for Ref service type RefServer interface { FindDefaultBranchName(context.Context, *FindDefaultBranchNameRequest) (*FindDefaultBranchNameResponse, error) FindAllBranchNames(*FindAllBranchNamesRequest, Ref_FindAllBranchNamesServer) error FindAllTagNames(*FindAllTagNamesRequest, Ref_FindAllTagNamesServer) error + // Find a Ref matching the given constraints. Response may be empty. + FindRefName(context.Context, *FindRefNameRequest) (*FindRefNameResponse, error) } func RegisterRefServer(s *grpc.Server, srv RefServer) { @@ -749,6 +869,24 @@ func (x *refFindAllTagNamesServer) Send(m *FindAllTagNamesResponse) error { return x.ServerStream.SendMsg(m) } +func _Ref_FindRefName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindRefNameRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RefServer).FindRefName(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitaly.Ref/FindRefName", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RefServer).FindRefName(ctx, req.(*FindRefNameRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Ref_serviceDesc = grpc.ServiceDesc{ ServiceName: "gitaly.Ref", HandlerType: (*RefServer)(nil), @@ -757,6 +895,10 @@ var _Ref_serviceDesc = grpc.ServiceDesc{ MethodName: "FindDefaultBranchName", Handler: _Ref_FindDefaultBranchName_Handler, }, + { + MethodName: "FindRefName", + Handler: _Ref_FindRefName_Handler, + }, }, Streams: []grpc.StreamDesc{ { @@ -866,48 +1008,120 @@ var _Diff_serviceDesc = grpc.ServiceDesc{ Metadata: "gitaly.proto", } +// Client API for Commit service + +type CommitClient interface { + CommitIsAncestor(ctx context.Context, in *CommitIsAncestorRequest, opts ...grpc.CallOption) (*CommitIsAncestorResponse, error) +} + +type commitClient struct { + cc *grpc.ClientConn +} + +func NewCommitClient(cc *grpc.ClientConn) CommitClient { + return &commitClient{cc} +} + +func (c *commitClient) CommitIsAncestor(ctx context.Context, in *CommitIsAncestorRequest, opts ...grpc.CallOption) (*CommitIsAncestorResponse, error) { + out := new(CommitIsAncestorResponse) + err := grpc.Invoke(ctx, "/gitaly.Commit/CommitIsAncestor", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for Commit service + +type CommitServer interface { + CommitIsAncestor(context.Context, *CommitIsAncestorRequest) (*CommitIsAncestorResponse, error) +} + +func RegisterCommitServer(s *grpc.Server, srv CommitServer) { + s.RegisterService(&_Commit_serviceDesc, srv) +} + +func _Commit_CommitIsAncestor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CommitIsAncestorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CommitServer).CommitIsAncestor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gitaly.Commit/CommitIsAncestor", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CommitServer).CommitIsAncestor(ctx, req.(*CommitIsAncestorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Commit_serviceDesc = grpc.ServiceDesc{ + ServiceName: "gitaly.Commit", + HandlerType: (*CommitServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CommitIsAncestor", + Handler: _Commit_CommitIsAncestor_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "gitaly.proto", +} + func init() { proto.RegisterFile("gitaly.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 629 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x55, 0xe1, 0x52, 0xd3, 0x40, - 0x10, 0x36, 0xd0, 0x96, 0x76, 0x29, 0x32, 0x2e, 0x02, 0x6d, 0x10, 0xad, 0x11, 0x9d, 0xfe, 0x42, - 0x2c, 0x4f, 0xa0, 0x30, 0x4a, 0x67, 0x14, 0x3a, 0x27, 0x3a, 0xe3, 0xaf, 0xce, 0xd1, 0xbb, 0x90, - 0x1b, 0x92, 0x5c, 0x4d, 0x0e, 0x3b, 0x3c, 0x88, 0xaf, 0xe0, 0xf3, 0xf8, 0x12, 0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9a, 0x65, 0x50, - 0x26, 0x78, 0xd5, 0xd0, 0x3f, 0xc9, 0xe3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x27, 0xf2, 0x52, - 0xe9, 0x4a, 0x07, 0x00, 0x00, + // 767 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x56, 0xef, 0x52, 0xd3, 0x40, + 0x10, 0x27, 0xf4, 0xff, 0xb6, 0x88, 0x6e, 0x05, 0x42, 0x2a, 0x52, 0x23, 0x3a, 0xf5, 0x0b, 0x62, + 0x79, 0x02, 0x84, 0xd1, 0x76, 0x46, 0xa1, 0x13, 0x51, 0xc7, 0x4f, 0x9d, 0x23, 0xb9, 0xd0, 0x0c, + 0x69, 0xae, 0x26, 0x57, 0x2a, 0x1f, 0x7c, 0x00, 0x1f, 0xc0, 0xf7, 0xf2, 0x25, 0xfc, 0xee, 0x23, + 0x38, 0xb9, 0x4b, 0x48, 0x68, 0xda, 0x3a, 0x63, 0xbf, 0xe5, 0xf6, 0xb7, 0xfb, 0xdb, 0xbd, 0xbd, + 0xfd, 0x13, 0xa8, 0x5d, 0x3a, 0x9c, 0xb8, 0x37, 0xfb, 0x23, 0x9f, 0x71, 0x86, 0x45, 0x79, 0xd2, + 0x6a, 0xc1, 0x80, 0xf8, 0xd4, 0x92, 0x52, 0xfd, 0x0c, 0xb6, 0xbb, 0x9e, 0xcd, 0x0c, 0x6a, 0x07, + 0x1f, 0x47, 0x2e, 0x23, 0x56, 0x8f, 0x98, 0x57, 0x06, 0xfd, 0x3a, 0xa6, 0x01, 0xc7, 0x36, 0x80, + 0x4f, 0x47, 0x2c, 0x70, 0x38, 0xf3, 0x6f, 0x54, 0xa5, 0xa9, 0xb4, 0xaa, 0x6d, 0xdc, 0x8f, 0x58, + 0x8d, 0x5b, 0xc4, 0x48, 0x69, 0xe9, 0x3d, 0xd0, 0x62, 0x42, 0x83, 0x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, 0xcf, 0x1c, 0x2c, 0x99, 0xbf, 0xb0, 0x49, 0x42, 0xce, 0x23, 0xd7, 0x4d, 0xf8, + 0x82, 0x65, 0x08, 0xdf, 0xc1, 0x66, 0x44, 0x78, 0x4e, 0x2e, 0x97, 0x66, 0x3b, 0x84, 0x9d, 0x39, + 0x57, 0x5e, 0xf0, 0x66, 0x6d, 0xd0, 0x66, 0xdd, 0x29, 0xe9, 0xab, 0x50, 0x2b, 0x50, 0x95, 0x66, + 0xae, 0x55, 0x33, 0xe4, 0x41, 0x7f, 0x09, 0x5b, 0x99, 0xb0, 0x17, 0x1a, 0xfc, 0x54, 0xe0, 0x81, + 0x2c, 0x8c, 0x13, 0xc7, 0xb6, 0x97, 0x29, 0x89, 0x3d, 0xb8, 0xe7, 0x52, 0x9b, 0xf7, 0xa7, 0xeb, + 0xb8, 0x16, 0x4a, 0x8f, 0xe3, 0x5a, 0x7e, 0x0e, 0xeb, 0xbe, 0x73, 0x39, 0x48, 0xab, 0xc9, 0xf2, + 0x58, 0x13, 0xe2, 0x58, 0x4f, 0xff, 0xad, 0x00, 0xa6, 0xe3, 0x8a, 0x2e, 0xd1, 0x80, 0x8a, 0xed, + 0xb3, 0x61, 0x7f, 0x44, 0xf8, 0x20, 0x4a, 0x56, 0x39, 0x14, 0xf4, 0x08, 0x1f, 0xe0, 0x16, 0x94, + 0x38, 0x93, 0xd0, 0xaa, 0x6c, 0x14, 0xce, 0x62, 0x40, 0x58, 0xdd, 0x3a, 0x2b, 0x86, 0xc7, 0xae, + 0x85, 0x75, 0x28, 0x70, 0x16, 0x8a, 0xf3, 0x42, 0x9c, 0xe7, 0x4c, 0x96, 0x2e, 0x73, 0xad, 0xfe, + 0x90, 0x59, 0x54, 0x2d, 0x34, 0x95, 0x56, 0xc1, 0x28, 0x31, 0xd7, 0x7a, 0xcf, 0x2c, 0x1a, 0x42, + 0x1e, 0x9d, 0x48, 0xa8, 0x28, 0x21, 0x8f, 0x4e, 0x04, 0xb4, 0x09,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0x95, 0xf6, 0x19, 0xe4, 0xc3, 0x0e, 0xc4, 0xb7, 0x00, 0x49, 0x3f, 0xe2, 0x76, 0x6c, 0x94, 0x99, + 0x1d, 0x9a, 0x36, 0x0b, 0x4a, 0x95, 0x07, 0x81, 0xa2, 0x44, 0xf0, 0x33, 0xdc, 0x9f, 0xde, 0x49, + 0xb8, 0x7b, 0xd7, 0x3a, 0xb3, 0xad, 0xb4, 0xe6, 0x7c, 0x85, 0xd8, 0xc9, 0x45, 0x51, 0xfc, 0x39, + 0x1d, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x10, 0x05, 0xc3, 0x5f, 0x09, 0x00, 0x00, } diff --git a/ruby/lib/gitaly/gitaly_pb.rb b/ruby/lib/gitaly/gitaly_pb.rb index 26b9de30c124e3099b83cd0cfe7c0ac29e2737be..c9c09818cd0f7ed5f230d42a4ba84fa1aa575012 100644 --- a/ruby/lib/gitaly/gitaly_pb.rb +++ b/ruby/lib/gitaly/gitaly_pb.rb @@ -11,6 +11,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "gitaly.InfoRefsReceivePackRequest" do optional :repository, :message, 1, "gitaly.Repository" end + add_message "gitaly.CommitIsAncestorResponse" do + optional :value, :bool, 1 + end add_message "gitaly.InfoRefsUploadPackResponse" do optional :data, :bytes, 1 end @@ -22,6 +25,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do end add_message "gitaly.PostReceiveResponse" do end + add_message "gitaly.FindRefNameRequest" do + optional :repository, :message, 1, "gitaly.Repository" + optional :commit_id, :string, 2 + optional :prefix, :bytes, 3 + end + add_message "gitaly.FindRefNameResponse" do + optional :name, :bytes, 1 + end + add_message "gitaly.CommitIsAncestorRequest" do + optional :repository, :message, 1, "gitaly.Repository" + optional :ancestor_id, :string, 2 + optional :child_id, :string, 3 + end add_message "gitaly.FindDefaultBranchNameRequest" do optional :repository, :message, 1, "gitaly.Repository" end @@ -60,10 +76,14 @@ end module Gitaly InfoRefsUploadPackRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.InfoRefsUploadPackRequest").msgclass InfoRefsReceivePackRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.InfoRefsReceivePackRequest").msgclass + CommitIsAncestorResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.CommitIsAncestorResponse").msgclass InfoRefsUploadPackResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.InfoRefsUploadPackResponse").msgclass InfoRefsReceivePackResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.InfoRefsReceivePackResponse").msgclass PostReceiveRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.PostReceiveRequest").msgclass PostReceiveResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.PostReceiveResponse").msgclass + FindRefNameRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindRefNameRequest").msgclass + FindRefNameResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindRefNameResponse").msgclass + CommitIsAncestorRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.CommitIsAncestorRequest").msgclass FindDefaultBranchNameRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindDefaultBranchNameRequest").msgclass FindAllBranchNamesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindAllBranchNamesRequest").msgclass FindAllTagNamesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindAllTagNamesRequest").msgclass diff --git a/ruby/lib/gitaly/gitaly_services_pb.rb b/ruby/lib/gitaly/gitaly_services_pb.rb index 0e8ea23dfa0971a260aaa649dc87d5007cd8805d..678d27b0cf4bdef006d691a05d6b5c78951d1ab8 100644 --- a/ruby/lib/gitaly/gitaly_services_pb.rb +++ b/ruby/lib/gitaly/gitaly_services_pb.rb @@ -49,6 +49,8 @@ module Gitaly rpc :FindDefaultBranchName, FindDefaultBranchNameRequest, FindDefaultBranchNameResponse rpc :FindAllBranchNames, FindAllBranchNamesRequest, stream(FindAllBranchNamesResponse) rpc :FindAllTagNames, FindAllTagNamesRequest, stream(FindAllTagNamesResponse) + # Find a Ref matching the given constraints. Response may be empty. + rpc :FindRefName, FindRefNameRequest, FindRefNameResponse end Stub = Service.rpc_stub_class @@ -66,6 +68,20 @@ module Gitaly rpc :CommitDiff, CommitDiffRequest, stream(CommitDiffResponse) end + Stub = Service.rpc_stub_class + end + module Commit + class Service + + include GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'gitaly.Commit' + + rpc :CommitIsAncestor, CommitIsAncestorRequest, CommitIsAncestorResponse + end + Stub = Service.rpc_stub_class end end