feat(api): extend commit and diff services with new functionality
- Add FindCommit, ListCommitsByOid, CommitIsAncestor RPCs to CommitService - Add CheckObjectsExist, CommitsByMessage, GetCommitStats RPCs to CommitService - Add LastCommitForPath, CountCommits, CountDivergingCommits RPCs to CommitService - Add RawDiff, RawPatch, FindChangedPaths RPCs to DiffService - Add FindMergeBase, WriteRef, SearchFilesByContent RPCs to RepositoryService - Add SearchFilesByName, ObjectsSize, RepositorySize RPCs to RepositoryService - Add FindLicense, OptimizeRepository, GetRawChanges RPCs to RepositoryService - Add FetchRemote, CreateRepositoryFromURL RPCs to RepositoryService - Implement server handlers for all new RPC methods - Add new modules for commit counting, finding, and querying features - Add new modules for diff changed paths and raw operations - Add new modules for refs and remote operations - Remove unnecessary comments from various source files - Update proto definitions with new message types and service methods
This commit is contained in:
@@ -132,9 +132,67 @@ message GetDiffStatsRequest {
|
||||
DiffOptions options = 4;
|
||||
}
|
||||
|
||||
|
||||
message RawDiffRequest {
|
||||
RepositoryHeader repository = 1;
|
||||
string base = 2; // revision or OID
|
||||
string head = 3;
|
||||
DiffOptions options = 4;
|
||||
}
|
||||
|
||||
message RawDiffResponse {
|
||||
bytes data = 1;
|
||||
}
|
||||
|
||||
message RawPatchRequest {
|
||||
RepositoryHeader repository = 1;
|
||||
string base = 2;
|
||||
string head = 3;
|
||||
}
|
||||
|
||||
message RawPatchResponse {
|
||||
bytes data = 1;
|
||||
}
|
||||
|
||||
|
||||
message FindChangedPathsRequest {
|
||||
RepositoryHeader repository = 1;
|
||||
string base = 2;
|
||||
string head = 3;
|
||||
repeated string paths = 4; // filter to these paths
|
||||
}
|
||||
|
||||
message ChangedPath {
|
||||
enum Status {
|
||||
CHANGED_PATH_STATUS_UNSPECIFIED = 0;
|
||||
CHANGED_PATH_STATUS_ADDED = 1;
|
||||
CHANGED_PATH_STATUS_MODIFIED = 2;
|
||||
CHANGED_PATH_STATUS_DELETED = 3;
|
||||
CHANGED_PATH_STATUS_RENAMED = 4;
|
||||
CHANGED_PATH_STATUS_COPIED = 5;
|
||||
CHANGED_PATH_STATUS_TYPE_CHANGED = 6;
|
||||
}
|
||||
|
||||
Status status = 1;
|
||||
string old_path = 2;
|
||||
string new_path = 3;
|
||||
uint32 additions = 4;
|
||||
uint32 deletions = 5;
|
||||
bool binary = 6;
|
||||
}
|
||||
|
||||
message FindChangedPathsResponse {
|
||||
repeated ChangedPath paths = 1;
|
||||
}
|
||||
|
||||
service DiffService {
|
||||
rpc GetDiff(GetDiffRequest) returns (GetDiffResponse);
|
||||
rpc GetCommitDiff(GetCommitDiffRequest) returns (GetDiffResponse);
|
||||
rpc GetPatch(GetPatchRequest) returns (stream GetPatchResponse);
|
||||
rpc GetDiffStats(GetDiffStatsRequest) returns (DiffStats);
|
||||
|
||||
rpc RawDiff(RawDiffRequest) returns (stream RawDiffResponse);
|
||||
rpc RawPatch(RawPatchRequest) returns (stream RawPatchResponse);
|
||||
|
||||
rpc FindChangedPaths(FindChangedPathsRequest) returns (FindChangedPathsResponse);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user