Commit 181c4179 authored by Ahmad Sherif's avatar Ahmad Sherif

Add LastCommitIdForPath RPC

Closes gitaly#431
parent 60534539
Pipeline #10385522 passed with stage
in 1 minute and 7 seconds
......@@ -18,6 +18,7 @@ service CommitService {
rpc FindAllCommits(FindAllCommitsRequest) returns (stream FindAllCommitsResponse) {};
rpc CommitLanguages(CommitLanguagesRequest) returns (CommitLanguagesResponse) {}
rpc RawBlame(RawBlameRequest) returns (stream RawBlameResponse) {}
rpc LastCommitIdForPath(LastCommitIdForPathRequest) returns (LastCommitIdForPathResponse) {}
}
message CommitStatsRequest {
......@@ -182,3 +183,14 @@ message RawBlameRequest {
message RawBlameResponse {
bytes data = 1;
}
message LastCommitIdForPathRequest {
Repository repository = 1;
bytes revision = 2;
bytes path = 3;
}
message LastCommitIdForPathResponse {
// Empty if not found
string commit_id = 1;
}
......@@ -42,6 +42,8 @@ It has these top-level messages:
CommitLanguagesResponse
RawBlameRequest
RawBlameResponse
LastCommitIdForPathRequest
LastCommitIdForPathResponse
CommitDiffRequest
CommitDiffResponse
CommitDeltaRequest
......
This diff is collapsed.
......@@ -130,6 +130,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "gitaly.RawBlameResponse" do
optional :data, :bytes, 1
end
add_message "gitaly.LastCommitIdForPathRequest" do
optional :repository, :message, 1, "gitaly.Repository"
optional :revision, :bytes, 2
optional :path, :bytes, 3
end
add_message "gitaly.LastCommitIdForPathResponse" do
optional :commit_id, :string, 1
end
end
module Gitaly
......@@ -160,4 +168,6 @@ module Gitaly
CommitLanguagesResponse::Language = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.CommitLanguagesResponse.Language").msgclass
RawBlameRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.RawBlameRequest").msgclass
RawBlameResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.RawBlameResponse").msgclass
LastCommitIdForPathRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.LastCommitIdForPathRequest").msgclass
LastCommitIdForPathResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.LastCommitIdForPathResponse").msgclass
end
......@@ -26,6 +26,7 @@ module Gitaly
rpc :FindAllCommits, FindAllCommitsRequest, stream(FindAllCommitsResponse)
rpc :CommitLanguages, CommitLanguagesRequest, CommitLanguagesResponse
rpc :RawBlame, RawBlameRequest, stream(RawBlameResponse)
rpc :LastCommitIdForPath, LastCommitIdForPathRequest, LastCommitIdForPathResponse
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