drone/gitrpc/proto/diff.proto
2023-01-31 02:08:23 +01:00

34 lines
950 B
Protocol Buffer

syntax = "proto3";
package rpc;
option go_package = "github.com/harness/gitness/gitrpc/rpc";
import "shared.proto";
// DiffService is a service which provides RPCs to inspect differences
// introduced between a set of commits.
service DiffService {
rpc RawDiff(DiffRequest) returns (stream RawDiffResponse) {}
rpc DiffShortStat(DiffRequest) returns (DiffShortStatResponse) {}
}
message DiffRequest {
ReadRequest base = 1;
// base_ref is left side of compare and can be branch, commit and tag
string base_ref = 2;
// head_ref is right side of compare and can be branch, commit and tag
string head_ref = 3;
// merge_base used only in branch comparison, if merge_base is true
// it will show diff from the commit where branch is created and head branch
bool merge_base = 4;
}
message RawDiffResponse {
bytes data = 1;
}
message DiffShortStatResponse {
int32 files = 1;
int32 additions = 2;
int32 deletions = 3;
}