Commit 12c29961 authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg Committed by Jacob Vosmaer

Define new RPC to get newly pushed objects

parent b26cda22
......@@ -64,6 +64,12 @@ message LFSPointer {
string oid = 3;
}
message NewBlobObject {
int64 size = 1;
string oid = 2;
bytes path = 3;
}
message GetLFSPointersRequest {
Repository repository = 1;
repeated string blob_ids = 2;
......
This diff is collapsed.
This diff is collapsed.
......@@ -2,6 +2,7 @@ syntax = "proto3";
package gitaly;
import "blob.proto";
import "shared.proto";
import "google/protobuf/timestamp.proto";
......@@ -29,6 +30,20 @@ service RefService {
// Returns commits that are only reachable from the ref passed
rpc ListNewCommits(ListNewCommitsRequest) returns (stream ListNewCommitsResponse) {}
rpc ListNewBlobs(ListNewBlobsRequest) returns (stream ListNewBlobsResponse) {}
}
message ListNewBlobsRequest {
Repository repository = 1;
string commit_id = 2;
// Limit the number of revs to be returned fro mgit-rev-list
// If the limit is set to zero, all items will be returned
uint32 limit = 3;
}
message ListNewBlobsResponse {
repeated NewBlobObject new_blob_objects = 1;
}
message FindDefaultBranchNameRequest {
......
......@@ -38,6 +38,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :data, :bytes, 2
optional :oid, :string, 3
end
add_message "gitaly.NewBlobObject" do
optional :size, :int64, 1
optional :oid, :string, 2
optional :path, :bytes, 3
end
add_message "gitaly.GetLFSPointersRequest" do
optional :repository, :message, 1, "gitaly.Repository"
repeated :blob_ids, :string, 2
......@@ -71,6 +76,7 @@ module Gitaly
GetBlobsRequest::RevisionPath = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.GetBlobsRequest.RevisionPath").msgclass
GetBlobsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.GetBlobsResponse").msgclass
LFSPointer = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.LFSPointer").msgclass
NewBlobObject = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.NewBlobObject").msgclass
GetLFSPointersRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.GetLFSPointersRequest").msgclass
GetLFSPointersResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.GetLFSPointersResponse").msgclass
GetNewLFSPointersRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.GetNewLFSPointersRequest").msgclass
......
......@@ -3,9 +3,18 @@
require 'google/protobuf'
require 'blob_pb'
require 'shared_pb'
require 'google/protobuf/timestamp_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "gitaly.ListNewBlobsRequest" do
optional :repository, :message, 1, "gitaly.Repository"
optional :commit_id, :string, 2
optional :limit, :uint32, 3
end
add_message "gitaly.ListNewBlobsResponse" do
repeated :new_blob_objects, :message, 1, "gitaly.NewBlobObject"
end
add_message "gitaly.FindDefaultBranchNameRequest" do
optional :repository, :message, 1, "gitaly.Repository"
end
......@@ -158,6 +167,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
end
module Gitaly
ListNewBlobsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.ListNewBlobsRequest").msgclass
ListNewBlobsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.ListNewBlobsResponse").msgclass
FindDefaultBranchNameRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindDefaultBranchNameRequest").msgclass
FindDefaultBranchNameResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindDefaultBranchNameResponse").msgclass
FindAllBranchNamesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.FindAllBranchNamesRequest").msgclass
......
......@@ -34,6 +34,7 @@ module Gitaly
rpc :GetTagMessages, GetTagMessagesRequest, stream(GetTagMessagesResponse)
# Returns commits that are only reachable from the ref passed
rpc :ListNewCommits, ListNewCommitsRequest, stream(ListNewCommitsResponse)
rpc :ListNewBlobs, ListNewBlobsRequest, stream(ListNewBlobsResponse)
end
Stub = Service.rpc_stub_class
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment