syntax = "proto3";
package rpc;

option go_package = "github.com/harness/gitness/gitrpc/rpc";

import "shared.proto";

service BlameService {
  rpc Blame(BlameRequest) returns (stream BlamePart);
}

message BlameRequest {
  ReadRequest base = 1;
  string git_ref   = 2;
  string path      = 3;
  LineRange range  = 4;
}

message LineRange {
  int32 from = 1;
  int32 to   = 2;
}

message BlamePart {
  Commit commit = 1;
  repeated string lines = 2;
}
