Files
zhenyi 66afd932ed 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
2026-06-08 15:37:08 +08:00

54 lines
1.1 KiB
Protocol Buffer

syntax = "proto3";
package gitks;
import "oid.proto";
import "repository.proto";
message FindRemoteRepositoryRequest {
string remote_url = 1;
}
message RemoteHead {
string ref_name = 1;
string target_oid = 2;
bool symbolic = 3;
string symbolic_target = 4;
}
message FindRemoteRepositoryResponse {
repeated RemoteHead refs = 1;
bool exists = 2;
}
message FindRemoteRootRefRequest {
string remote_url = 1;
}
message FindRemoteRootRefResponse {
string ref_name = 1;
string target_oid = 2;
}
message UpdateRemoteMirrorRequest {
RepositoryHeader repository = 1;
string remote_url = 2;
string remote_name = 3; // defaults to "origin"
bool force = 4;
bool prune = 5;
repeated string refspecs = 6; // if empty, fetch all refs
}
message UpdateRemoteMirrorResponse {
bool ok = 1;
string error = 2;
}
service RemoteService {
rpc FindRemoteRepository(FindRemoteRepositoryRequest) returns (FindRemoteRepositoryResponse);
rpc FindRemoteRootRef(FindRemoteRootRefRequest) returns (FindRemoteRootRefResponse);
rpc UpdateRemoteMirror(UpdateRemoteMirrorRequest) returns (UpdateRemoteMirrorResponse);
}