Skip to content
Snippets Groups Projects
Commit c1870f3d authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab)
Browse files
parents c7ba74a5 1183d859
No related branches found
No related tags found
No related merge requests found
Pipeline #
Loading
Loading
@@ -4,6 +4,8 @@ require 'erb'
require_relative 'run.rb'
 
GEM_NAME = 'gitaly'
RUBY_PREFIX = 'ruby/lib'
RUBY_VERSION_FILE = 'gitaly/version.rb'
 
def main(version)
run!(%w[_support/generate-from-proto])
Loading
Loading
@@ -11,6 +13,7 @@ def main(version)
run!(%w[git diff --quiet --exit-code])
puts 'Testing for staged changes'
run!(%w[git diff --quiet --cached --exit-code])
write_ruby_requires
write_version_files(version)
version_msg = "Version #{version}"
run!(%W[git commit -m #{version_msg}])
Loading
Loading
@@ -45,11 +48,27 @@ module Gitaly
VERSION = "#{version}"
end
EOT
version_rb = 'ruby/lib/gitaly/version.rb'
version_rb = File.join(RUBY_PREFIX, RUBY_VERSION_FILE)
open(version_rb, 'w') { |f| f.write(version_rb_template.result) }
run!(%W[git add #{version_rb}])
end
 
def write_ruby_requires
requires = Dir.chdir(RUBY_PREFIX) { Dir['gitaly/*_services_pb.rb'] }
abort "No auto-generated Ruby service files found" if requires.empty?
requires.unshift(RUBY_VERSION_FILE)
gem_root = File.join(RUBY_PREFIX, 'gitaly.rb')
gem_root_template = ERB.new <<EOT
# This file is generated by _support/release. Do not edit.
$:.unshift(File.expand_path('../gitaly', __FILE__))
<% requires.each do |f| %>
require '<%= f.sub(/\.rb$/, '') %>'
<% end %>
EOT
open(gem_root, 'w') { |f| f.write(gem_root_template.result(binding)) }
run!(%W[git add #{gem_root}])
end
def error(msg)
warn "#{$0}: #{msg}"
end
Loading
Loading
Loading
Loading
@@ -4,15 +4,6 @@ package gitaly;
 
import "shared.proto";
 
// The Git 'smart HTTP' protocol
service SmartHTTP {
// The response body for GET /info/refs?service=git-upload-pack
rpc InfoRefsUploadPack(InfoRefsUploadPackRequest) returns (stream InfoRefsUploadPackResponse) {}
// The response body for GET /info/refs?service=git-receive-pack
rpc InfoRefsReceivePack(InfoRefsReceivePackRequest) returns (stream InfoRefsReceivePackResponse) {}
}
service Notifications {
rpc PostReceive(PostReceiveRequest) returns (PostReceiveResponse) {}
}
Loading
Loading
@@ -21,6 +12,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 {
Loading
Loading
@@ -28,28 +21,39 @@ service Diff {
rpc CommitDiff(CommitDiffRequest) returns (stream CommitDiffResponse) {};
}
 
message InfoRefsUploadPackRequest {
Repository repository = 1;
service Commit {
rpc CommitIsAncestor(CommitIsAncestorRequest) returns (CommitIsAncestorResponse) {}
}
 
message InfoRefsReceivePackRequest {
message CommitIsAncestorResponse {
bool value = 1;
}
message PostReceiveRequest {
Repository repository = 1;
}
 
message InfoRefsUploadPackResponse {
bytes data = 1;
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 InfoRefsReceivePackResponse {
bytes data = 1;
message FindRefNameResponse {
// Example name: "refs/heads/master". Cannot assume UTF8, so the type is bytes.
bytes name = 1;
}
 
message PostReceiveRequest {
message CommitIsAncestorRequest {
Repository repository = 1;
string ancestor_id = 2;
string child_id = 3;
}
 
message PostReceiveResponse {}
message FindDefaultBranchNameRequest {
Repository repository = 1;
}
Loading
Loading
This diff is collapsed.
Loading
Loading
@@ -2,31 +2,28 @@ package helper
 
import (
"io"
pb "gitlab.com/gitlab-org/gitaly-proto/go"
)
 
type DataGetter interface {
GetData() []byte
type InfoRefsClient interface {
Recv() (*pb.InfoRefsResponse, error)
}
 
func DataWithError(dg DataGetter, err error) ([]byte, error) {
return dg.GetData(), err
type InfoRefsClientWriterTo struct {
InfoRefsClient
}
 
// Example use:
//
// BytesReceiver(func() ([]byte, error) { DataWithError(c.Recv()) }).WriteTo(writer)
type BytesReceiver func() ([]byte, error)
func (br BytesReceiver) WriteTo(w io.Writer) (total int64, err error) {
func (clientReader *InfoRefsClientWriterTo) WriteTo(w io.Writer) (total int64, err error) {
for {
b, err := br()
response, err := clientReader.Recv()
if err == io.EOF {
return total, nil
} else if err != nil {
return total, err
}
 
n, err := w.Write(b)
n, err := w.Write(response.GetData())
total += int64(n)
if err != nil {
return total, err
Loading
Loading
// Code generated by protoc-gen-go.
// source: smarthttp.proto
// DO NOT EDIT!
package gitaly
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type InfoRefsRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository" json:"repository,omitempty"`
}
func (m *InfoRefsRequest) Reset() { *m = InfoRefsRequest{} }
func (m *InfoRefsRequest) String() string { return proto.CompactTextString(m) }
func (*InfoRefsRequest) ProtoMessage() {}
func (*InfoRefsRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
func (m *InfoRefsRequest) GetRepository() *Repository {
if m != nil {
return m.Repository
}
return nil
}
type InfoRefsResponse struct {
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}
func (m *InfoRefsResponse) Reset() { *m = InfoRefsResponse{} }
func (m *InfoRefsResponse) String() string { return proto.CompactTextString(m) }
func (*InfoRefsResponse) ProtoMessage() {}
func (*InfoRefsResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
func (m *InfoRefsResponse) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
func init() {
proto.RegisterType((*InfoRefsRequest)(nil), "gitaly.InfoRefsRequest")
proto.RegisterType((*InfoRefsResponse)(nil), "gitaly.InfoRefsResponse")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for SmartHTTP service
type SmartHTTPClient interface {
// The response body for GET /info/refs?service=git-upload-pack
InfoRefsUploadPack(ctx context.Context, in *InfoRefsRequest, opts ...grpc.CallOption) (SmartHTTP_InfoRefsUploadPackClient, error)
// The response body for GET /info/refs?service=git-receive-pack
InfoRefsReceivePack(ctx context.Context, in *InfoRefsRequest, opts ...grpc.CallOption) (SmartHTTP_InfoRefsReceivePackClient, error)
}
type smartHTTPClient struct {
cc *grpc.ClientConn
}
func NewSmartHTTPClient(cc *grpc.ClientConn) SmartHTTPClient {
return &smartHTTPClient{cc}
}
func (c *smartHTTPClient) InfoRefsUploadPack(ctx context.Context, in *InfoRefsRequest, opts ...grpc.CallOption) (SmartHTTP_InfoRefsUploadPackClient, error) {
stream, err := grpc.NewClientStream(ctx, &_SmartHTTP_serviceDesc.Streams[0], c.cc, "/gitaly.SmartHTTP/InfoRefsUploadPack", opts...)
if err != nil {
return nil, err
}
x := &smartHTTPInfoRefsUploadPackClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type SmartHTTP_InfoRefsUploadPackClient interface {
Recv() (*InfoRefsResponse, error)
grpc.ClientStream
}
type smartHTTPInfoRefsUploadPackClient struct {
grpc.ClientStream
}
func (x *smartHTTPInfoRefsUploadPackClient) Recv() (*InfoRefsResponse, error) {
m := new(InfoRefsResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *smartHTTPClient) InfoRefsReceivePack(ctx context.Context, in *InfoRefsRequest, opts ...grpc.CallOption) (SmartHTTP_InfoRefsReceivePackClient, error) {
stream, err := grpc.NewClientStream(ctx, &_SmartHTTP_serviceDesc.Streams[1], c.cc, "/gitaly.SmartHTTP/InfoRefsReceivePack", opts...)
if err != nil {
return nil, err
}
x := &smartHTTPInfoRefsReceivePackClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type SmartHTTP_InfoRefsReceivePackClient interface {
Recv() (*InfoRefsResponse, error)
grpc.ClientStream
}
type smartHTTPInfoRefsReceivePackClient struct {
grpc.ClientStream
}
func (x *smartHTTPInfoRefsReceivePackClient) Recv() (*InfoRefsResponse, error) {
m := new(InfoRefsResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// Server API for SmartHTTP service
type SmartHTTPServer interface {
// The response body for GET /info/refs?service=git-upload-pack
InfoRefsUploadPack(*InfoRefsRequest, SmartHTTP_InfoRefsUploadPackServer) error
// The response body for GET /info/refs?service=git-receive-pack
InfoRefsReceivePack(*InfoRefsRequest, SmartHTTP_InfoRefsReceivePackServer) error
}
func RegisterSmartHTTPServer(s *grpc.Server, srv SmartHTTPServer) {
s.RegisterService(&_SmartHTTP_serviceDesc, srv)
}
func _SmartHTTP_InfoRefsUploadPack_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(InfoRefsRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(SmartHTTPServer).InfoRefsUploadPack(m, &smartHTTPInfoRefsUploadPackServer{stream})
}
type SmartHTTP_InfoRefsUploadPackServer interface {
Send(*InfoRefsResponse) error
grpc.ServerStream
}
type smartHTTPInfoRefsUploadPackServer struct {
grpc.ServerStream
}
func (x *smartHTTPInfoRefsUploadPackServer) Send(m *InfoRefsResponse) error {
return x.ServerStream.SendMsg(m)
}
func _SmartHTTP_InfoRefsReceivePack_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(InfoRefsRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(SmartHTTPServer).InfoRefsReceivePack(m, &smartHTTPInfoRefsReceivePackServer{stream})
}
type SmartHTTP_InfoRefsReceivePackServer interface {
Send(*InfoRefsResponse) error
grpc.ServerStream
}
type smartHTTPInfoRefsReceivePackServer struct {
grpc.ServerStream
}
func (x *smartHTTPInfoRefsReceivePackServer) Send(m *InfoRefsResponse) error {
return x.ServerStream.SendMsg(m)
}
var _SmartHTTP_serviceDesc = grpc.ServiceDesc{
ServiceName: "gitaly.SmartHTTP",
HandlerType: (*SmartHTTPServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "InfoRefsUploadPack",
Handler: _SmartHTTP_InfoRefsUploadPack_Handler,
ServerStreams: true,
},
{
StreamName: "InfoRefsReceivePack",
Handler: _SmartHTTP_InfoRefsReceivePack_Handler,
ServerStreams: true,
},
},
Metadata: "smarthttp.proto",
}
func init() { proto.RegisterFile("smarthttp.proto", fileDescriptor2) }
var fileDescriptor2 = []byte{
// 200 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0xce, 0x4d, 0x2c,
0x2a, 0xc9, 0x28, 0x29, 0x29, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x4b, 0xcf, 0x2c,
0x49, 0xcc, 0xa9, 0x94, 0xe2, 0x29, 0xce, 0x48, 0x2c, 0x4a, 0x4d, 0x81, 0x88, 0x2a, 0xb9, 0x72,
0xf1, 0x7b, 0xe6, 0xa5, 0xe5, 0x07, 0xa5, 0xa6, 0x15, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97,
0x08, 0x19, 0x71, 0x71, 0x15, 0xa5, 0x16, 0xe4, 0x17, 0x67, 0x96, 0xe4, 0x17, 0x55, 0x4a, 0x30,
0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x09, 0xe9, 0x41, 0x74, 0xeb, 0x05, 0xc1, 0x65, 0x82, 0x90, 0x54,
0x29, 0xa9, 0x71, 0x09, 0x20, 0x8c, 0x29, 0x2e, 0xc8, 0xcf, 0x2b, 0x4e, 0x15, 0x12, 0xe2, 0x62,
0x49, 0x49, 0x2c, 0x49, 0x04, 0x9b, 0xc0, 0x13, 0x04, 0x66, 0x1b, 0x2d, 0x63, 0xe4, 0xe2, 0x0c,
0x06, 0x39, 0xcc, 0x23, 0x24, 0x24, 0x40, 0xc8, 0x9b, 0x4b, 0x08, 0xa6, 0x2b, 0xb4, 0x20, 0x27,
0x3f, 0x31, 0x25, 0x20, 0x31, 0x39, 0x5b, 0x48, 0x1c, 0x66, 0x17, 0x9a, 0xc3, 0xa4, 0x24, 0x30,
0x25, 0x20, 0x56, 0x29, 0x31, 0x18, 0x30, 0x0a, 0xf9, 0x70, 0x09, 0x23, 0xc4, 0x93, 0x53, 0x33,
0xcb, 0x52, 0x29, 0x30, 0x2d, 0x89, 0x0d, 0x1c, 0x3c, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff,
0xfd, 0x13, 0x70, 0x6d, 0x47, 0x01, 0x00, 0x00,
}
Loading
Loading
@@ -28,7 +28,7 @@ type SSHUploadPackRequest struct {
func (m *SSHUploadPackRequest) Reset() { *m = SSHUploadPackRequest{} }
func (m *SSHUploadPackRequest) String() string { return proto.CompactTextString(m) }
func (*SSHUploadPackRequest) ProtoMessage() {}
func (*SSHUploadPackRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
func (*SSHUploadPackRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
 
func (m *SSHUploadPackRequest) GetRepository() *Repository {
if m != nil {
Loading
Loading
@@ -57,7 +57,7 @@ type SSHUploadPackResponse struct {
func (m *SSHUploadPackResponse) Reset() { *m = SSHUploadPackResponse{} }
func (m *SSHUploadPackResponse) String() string { return proto.CompactTextString(m) }
func (*SSHUploadPackResponse) ProtoMessage() {}
func (*SSHUploadPackResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
func (*SSHUploadPackResponse) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} }
 
func (m *SSHUploadPackResponse) GetStdout() []byte {
if m != nil {
Loading
Loading
@@ -92,7 +92,7 @@ type SSHReceivePackRequest struct {
func (m *SSHReceivePackRequest) Reset() { *m = SSHReceivePackRequest{} }
func (m *SSHReceivePackRequest) String() string { return proto.CompactTextString(m) }
func (*SSHReceivePackRequest) ProtoMessage() {}
func (*SSHReceivePackRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} }
func (*SSHReceivePackRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{2} }
 
func (m *SSHReceivePackRequest) GetRepository() *Repository {
if m != nil {
Loading
Loading
@@ -128,7 +128,7 @@ type SSHReceivePackResponse struct {
func (m *SSHReceivePackResponse) Reset() { *m = SSHReceivePackResponse{} }
func (m *SSHReceivePackResponse) String() string { return proto.CompactTextString(m) }
func (*SSHReceivePackResponse) ProtoMessage() {}
func (*SSHReceivePackResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} }
func (*SSHReceivePackResponse) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{3} }
 
func (m *SSHReceivePackResponse) GetStdout() []byte {
if m != nil {
Loading
Loading
@@ -331,9 +331,9 @@ var _SSH_serviceDesc = grpc.ServiceDesc{
Metadata: "ssh.proto",
}
 
func init() { proto.RegisterFile("ssh.proto", fileDescriptor2) }
func init() { proto.RegisterFile("ssh.proto", fileDescriptor3) }
 
var fileDescriptor2 = []byte{
var fileDescriptor3 = []byte{
// 284 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x52, 0xcd, 0x4a, 0xc3, 0x40,
0x10, 0x76, 0xad, 0x0d, 0x74, 0x1a, 0x3d, 0xac, 0xb5, 0x84, 0xa0, 0x52, 0x72, 0xca, 0x29, 0x48,
Loading
Loading
Loading
Loading
@@ -5,22 +5,26 @@ require 'google/protobuf'
 
require 'shared_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "gitaly.InfoRefsUploadPackRequest" do
optional :repository, :message, 1, "gitaly.Repository"
add_message "gitaly.CommitIsAncestorResponse" do
optional :value, :bool, 1
end
add_message "gitaly.InfoRefsReceivePackRequest" do
add_message "gitaly.PostReceiveRequest" do
optional :repository, :message, 1, "gitaly.Repository"
end
add_message "gitaly.InfoRefsUploadPackResponse" do
optional :data, :bytes, 1
end
add_message "gitaly.InfoRefsReceivePackResponse" do
optional :data, :bytes, 1
add_message "gitaly.PostReceiveResponse" do
end
add_message "gitaly.PostReceiveRequest" do
add_message "gitaly.FindRefNameRequest" do
optional :repository, :message, 1, "gitaly.Repository"
optional :commit_id, :string, 2
optional :prefix, :bytes, 3
end
add_message "gitaly.PostReceiveResponse" do
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"
Loading
Loading
@@ -58,12 +62,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
end
 
module Gitaly
InfoRefsUploadPackRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.InfoRefsUploadPackRequest").msgclass
InfoRefsReceivePackRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.InfoRefsReceivePackRequest").msgclass
InfoRefsUploadPackResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.InfoRefsUploadPackResponse").msgclass
InfoRefsReceivePackResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.InfoRefsReceivePackResponse").msgclass
CommitIsAncestorResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.CommitIsAncestorResponse").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
Loading
Loading
Loading
Loading
@@ -5,24 +5,6 @@ require 'grpc'
require 'gitaly_pb'
 
module Gitaly
module SmartHTTP
# The Git 'smart HTTP' protocol
class Service
include GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'gitaly.SmartHTTP'
# The response body for GET /info/refs?service=git-upload-pack
rpc :InfoRefsUploadPack, InfoRefsUploadPackRequest, stream(InfoRefsUploadPackResponse)
# The response body for GET /info/refs?service=git-receive-pack
rpc :InfoRefsReceivePack, InfoRefsReceivePackRequest, stream(InfoRefsReceivePackResponse)
end
Stub = Service.rpc_stub_class
end
module Notifications
class Service
 
Loading
Loading
@@ -49,6 +31,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
Loading
Loading
@@ -66,6 +50,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
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: smarthttp.proto
require 'google/protobuf'
require 'shared_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "gitaly.InfoRefsRequest" do
optional :repository, :message, 1, "gitaly.Repository"
end
add_message "gitaly.InfoRefsResponse" do
optional :data, :bytes, 1
end
end
module Gitaly
InfoRefsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.InfoRefsRequest").msgclass
InfoRefsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.InfoRefsResponse").msgclass
end
# Generated by the protocol buffer compiler. DO NOT EDIT!
# Source: smarthttp.proto for package 'gitaly'
require 'grpc'
require 'smarthttp_pb'
module Gitaly
module SmartHTTP
class Service
include GRPC::GenericService
self.marshal_class_method = :encode
self.unmarshal_class_method = :decode
self.service_name = 'gitaly.SmartHTTP'
# The response body for GET /info/refs?service=git-upload-pack
rpc :InfoRefsUploadPack, InfoRefsRequest, stream(InfoRefsResponse)
# The response body for GET /info/refs?service=git-receive-pack
rpc :InfoRefsReceivePack, InfoRefsRequest, stream(InfoRefsResponse)
end
Stub = Service.rpc_stub_class
end
end
syntax = "proto3";
package gitaly;
import "shared.proto";
service SmartHTTP {
// The response body for GET /info/refs?service=git-upload-pack
rpc InfoRefsUploadPack(InfoRefsRequest) returns (stream InfoRefsResponse) {}
// The response body for GET /info/refs?service=git-receive-pack
rpc InfoRefsReceivePack(InfoRefsRequest) returns (stream InfoRefsResponse) {}
}
message InfoRefsRequest {
Repository repository = 1;
}
message InfoRefsResponse {
bytes data = 1;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment