Merge ef0b7b0cfc5e5c8e08a37f7ed456c706ac14aa76 into 5e05d65caece9a3677c109ffa343ad00358d4405
2 files · +177 -70
M gen/ermite/git.pb.go +152 -67
| @@ -215,6 +215,71 @@ func (FileStatus) EnumDescriptor() ([]byte, []int) { | |||
| 215 | 215 | return file_ermite_git_proto_rawDescGZIP(), []int{2} | |
| 216 | 216 | } | |
| 217 | 217 | ||
| 218 | + | // FileOmission tells why a changed file has no hunks although it changed. | |
| 219 | + | type FileOmission int32 | |
| 220 | + | ||
| 221 | + | const ( | |
| 222 | + | // The file is not omitted: its hunks are present, or it has none to show | |
| 223 | + | // (binary, pure rename, mode change), or it is outside the requested window. | |
| 224 | + | FileOmission_FILE_OMISSION_UNSPECIFIED FileOmission = 0 | |
| 225 | + | // The file is generated or vendored, by its path: its hunks were not read. | |
| 226 | + | // It can be read on its own. | |
| 227 | + | FileOmission_FILE_OMISSION_GENERATED FileOmission = 1 | |
| 228 | + | // The file changes more lines than the per-file limit. It can be read on its own. | |
| 229 | + | FileOmission_FILE_OMISSION_LARGE FileOmission = 2 | |
| 230 | + | // The file did not fit in what remained of the total limits of the diff. | |
| 231 | + | // It can be read on its own. | |
| 232 | + | FileOmission_FILE_OMISSION_BUDGET FileOmission = 3 | |
| 233 | + | // The file's text exceeds the memory limit of a diff: it cannot be shown, | |
| 234 | + | // even on its own. Clone the repository to read it. | |
| 235 | + | FileOmission_FILE_OMISSION_UNAVAILABLE FileOmission = 4 | |
| 236 | + | ) | |
| 237 | + | ||
| 238 | + | // Enum value maps for FileOmission. | |
| 239 | + | var ( | |
| 240 | + | FileOmission_name = map[int32]string{ | |
| 241 | + | 0: "FILE_OMISSION_UNSPECIFIED", | |
| 242 | + | 1: "FILE_OMISSION_GENERATED", | |
| 243 | + | 2: "FILE_OMISSION_LARGE", | |
| 244 | + | 3: "FILE_OMISSION_BUDGET", | |
| 245 | + | 4: "FILE_OMISSION_UNAVAILABLE", | |
| 246 | + | } | |
| 247 | + | FileOmission_value = map[string]int32{ | |
| 248 | + | "FILE_OMISSION_UNSPECIFIED": 0, | |
| 249 | + | "FILE_OMISSION_GENERATED": 1, | |
| 250 | + | "FILE_OMISSION_LARGE": 2, | |
| 251 | + | "FILE_OMISSION_BUDGET": 3, | |
| 252 | + | "FILE_OMISSION_UNAVAILABLE": 4, | |
| 253 | + | } | |
| 254 | + | ) | |
| 255 | + | ||
| 256 | + | func (x FileOmission) Enum() *FileOmission { | |
| 257 | + | p := new(FileOmission) | |
| 258 | + | *p = x | |
| 259 | + | return p | |
| 260 | + | } | |
| 261 | + | ||
| 262 | + | func (x FileOmission) String() string { | |
| 263 | + | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | |
| 264 | + | } | |
| 265 | + | ||
| 266 | + | func (FileOmission) Descriptor() protoreflect.EnumDescriptor { | |
| 267 | + | return file_ermite_git_proto_enumTypes[3].Descriptor() | |
| 268 | + | } | |
| 269 | + | ||
| 270 | + | func (FileOmission) Type() protoreflect.EnumType { | |
| 271 | + | return &file_ermite_git_proto_enumTypes[3] | |
| 272 | + | } | |
| 273 | + | ||
| 274 | + | func (x FileOmission) Number() protoreflect.EnumNumber { | |
| 275 | + | return protoreflect.EnumNumber(x) | |
| 276 | + | } | |
| 277 | + | ||
| 278 | + | // Deprecated: Use FileOmission.Descriptor instead. | |
| 279 | + | func (FileOmission) EnumDescriptor() ([]byte, []int) { | |
| 280 | + | return file_ermite_git_proto_rawDescGZIP(), []int{3} | |
| 281 | + | } | |
| 282 | + | ||
| 218 | 283 | // LineKind tells how a line of a hunk relates to the two sides of a diff. | |
| 219 | 284 | type LineKind int32 | |
| 220 | 285 | ||
| @@ -256,11 +321,11 @@ func (x LineKind) String() string { | |||
| 256 | 321 | } | |
| 257 | 322 | ||
| 258 | 323 | func (LineKind) Descriptor() protoreflect.EnumDescriptor { | |
| 259 | - | return file_ermite_git_proto_enumTypes[3].Descriptor() | |
| 324 | + | return file_ermite_git_proto_enumTypes[4].Descriptor() | |
| 260 | 325 | } | |
| 261 | 326 | ||
| 262 | 327 | func (LineKind) Type() protoreflect.EnumType { | |
| 263 | - | return &file_ermite_git_proto_enumTypes[3] | |
| 328 | + | return &file_ermite_git_proto_enumTypes[4] | |
| 264 | 329 | } | |
| 265 | 330 | ||
| 266 | 331 | func (x LineKind) Number() protoreflect.EnumNumber { | |
| @@ -269,7 +334,7 @@ func (x LineKind) Number() protoreflect.EnumNumber { | |||
| 269 | 334 | ||
| 270 | 335 | // Deprecated: Use LineKind.Descriptor instead. | |
| 271 | 336 | func (LineKind) EnumDescriptor() ([]byte, []int) { | |
| 272 | - | return file_ermite_git_proto_rawDescGZIP(), []int{3} | |
| 337 | + | return file_ermite_git_proto_rawDescGZIP(), []int{4} | |
| 273 | 338 | } | |
| 274 | 339 | ||
| 275 | 340 | // Ref is a branch, a tag or HEAD. | |
| @@ -1444,8 +1509,8 @@ type Diff struct { | |||
| 1444 | 1509 | // Files are the changed files, ordered by path. Files past the file limit are | |
| 1445 | 1510 | // omitted. | |
| 1446 | 1511 | Files []*FileDiff `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` | |
| 1447 | - | // Truncated is true when the diff is incomplete: files were omitted, or at | |
| 1448 | - | // least one listed file has truncated set. DiffStats still count everything. | |
| 1512 | + | // Truncated is true when the diff is incomplete: files were omitted past the | |
| 1513 | + | // file limit, or at least one listed file has omitted set. DiffStats still count everything. | |
| 1449 | 1514 | Truncated bool `protobuf:"varint,2,opt,name=truncated,proto3" json:"truncated,omitempty"` | |
| 1450 | 1515 | unknownFields protoimpl.UnknownFields | |
| 1451 | 1516 | sizeCache protoimpl.SizeCache | |
| @@ -1523,11 +1588,15 @@ type FileDiff struct { | |||
| 1523 | 1588 | // copied file, and 0 otherwise. | |
| 1524 | 1589 | Similarity int32 `protobuf:"varint,11,opt,name=similarity,proto3" json:"similarity,omitempty"` | |
| 1525 | 1590 | // Truncated is true when the file exceeded a diff limit: hunks is then empty | |
| 1526 | - | // although the file changed. Additions and deletions remain accurate. | |
| 1591 | + | // although the file changed. Additions and deletions remain accurate. It is | |
| 1592 | + | // kept for compatibility and equals omitted != FILE_OMISSION_UNSPECIFIED. | |
| 1527 | 1593 | Truncated bool `protobuf:"varint,12,opt,name=truncated,proto3" json:"truncated,omitempty"` | |
| 1528 | 1594 | // Hunks are the changed regions, in file order. Empty for a binary file, a | |
| 1529 | 1595 | // truncated file, a pure rename and a mode-only change. | |
| 1530 | - | Hunks []*Hunk `protobuf:"bytes,13,rep,name=hunks,proto3" json:"hunks,omitempty"` | |
| 1596 | + | Hunks []*Hunk `protobuf:"bytes,13,rep,name=hunks,proto3" json:"hunks,omitempty"` | |
| 1597 | + | // Omitted tells why hunks is empty although the file changed. truncated is | |
| 1598 | + | // true exactly when omitted is not FILE_OMISSION_UNSPECIFIED. | |
| 1599 | + | Omitted FileOmission `protobuf:"varint,14,opt,name=omitted,proto3,enum=ermite.FileOmission" json:"omitted,omitempty"` | |
| 1531 | 1600 | unknownFields protoimpl.UnknownFields | |
| 1532 | 1601 | sizeCache protoimpl.SizeCache | |
| 1533 | 1602 | } | |
| @@ -1653,6 +1722,13 @@ func (x *FileDiff) GetHunks() []*Hunk { | |||
| 1653 | 1722 | return nil | |
| 1654 | 1723 | } | |
| 1655 | 1724 | ||
| 1725 | + | func (x *FileDiff) GetOmitted() FileOmission { | |
| 1726 | + | if x != nil { | |
| 1727 | + | return x.Omitted | |
| 1728 | + | } | |
| 1729 | + | return FileOmission_FILE_OMISSION_UNSPECIFIED | |
| 1730 | + | } | |
| 1731 | + | ||
| 1656 | 1732 | // Hunk is a contiguous changed region with its context. | |
| 1657 | 1733 | type Hunk struct { | |
| 1658 | 1734 | state protoimpl.MessageState `protogen:"open.v1"` | |
| @@ -2031,7 +2107,7 @@ const file_ermite_git_proto_rawDesc = "" + | |||
| 2031 | 2107 | "\tdeletions\x18\x03 \x01(\x05R\tdeletions\"L\n" + | |
| 2032 | 2108 | "\x04Diff\x12&\n" + | |
| 2033 | 2109 | "\x05files\x18\x01 \x03(\v2\x10.ermite.FileDiffR\x05files\x12\x1c\n" + | |
| 2034 | - | "\ttruncated\x18\x02 \x01(\bR\ttruncated\"\x86\x03\n" + | |
| 2110 | + | "\ttruncated\x18\x02 \x01(\bR\ttruncated\"\xb6\x03\n" + | |
| 2035 | 2111 | "\bFileDiff\x12\x19\n" + | |
| 2036 | 2112 | "\bold_path\x18\x01 \x01(\tR\aoldPath\x12\x19\n" + | |
| 2037 | 2113 | "\bnew_path\x18\x02 \x01(\tR\anewPath\x12*\n" + | |
| @@ -2048,7 +2124,8 @@ const file_ermite_git_proto_rawDesc = "" + | |||
| 2048 | 2124 | "similarity\x18\v \x01(\x05R\n" + | |
| 2049 | 2125 | "similarity\x12\x1c\n" + | |
| 2050 | 2126 | "\ttruncated\x18\f \x01(\bR\ttruncated\x12\"\n" + | |
| 2051 | - | "\x05hunks\x18\r \x03(\v2\f.ermite.HunkR\x05hunks\"\xb6\x01\n" + | |
| 2127 | + | "\x05hunks\x18\r \x03(\v2\f.ermite.HunkR\x05hunks\x12.\n" + | |
| 2128 | + | "\aomitted\x18\x0e \x01(\x0e2\x14.ermite.FileOmissionR\aomitted\"\xb6\x01\n" + | |
| 2052 | 2129 | "\x04Hunk\x12\x1b\n" + | |
| 2053 | 2130 | "\told_start\x18\x01 \x01(\x05R\boldStart\x12\x1b\n" + | |
| 2054 | 2131 | "\told_lines\x18\x02 \x01(\x05R\boldLines\x12\x1b\n" + | |
| @@ -2090,7 +2167,13 @@ const file_ermite_git_proto_rawDesc = "" + | |||
| 2090 | 2167 | "\x14FILE_STATUS_MODIFIED\x10\x03\x12\x17\n" + | |
| 2091 | 2168 | "\x13FILE_STATUS_RENAMED\x10\x04\x12\x16\n" + | |
| 2092 | 2169 | "\x12FILE_STATUS_COPIED\x10\x05\x12\x1c\n" + | |
| 2093 | - | "\x18FILE_STATUS_TYPE_CHANGED\x10\x06*l\n" + | |
| 2170 | + | "\x18FILE_STATUS_TYPE_CHANGED\x10\x06*\x9c\x01\n" + | |
| 2171 | + | "\fFileOmission\x12\x1d\n" + | |
| 2172 | + | "\x19FILE_OMISSION_UNSPECIFIED\x10\x00\x12\x1b\n" + | |
| 2173 | + | "\x17FILE_OMISSION_GENERATED\x10\x01\x12\x17\n" + | |
| 2174 | + | "\x13FILE_OMISSION_LARGE\x10\x02\x12\x18\n" + | |
| 2175 | + | "\x14FILE_OMISSION_BUDGET\x10\x03\x12\x1d\n" + | |
| 2176 | + | "\x19FILE_OMISSION_UNAVAILABLE\x10\x04*l\n" + | |
| 2094 | 2177 | "\bLineKind\x12\x19\n" + | |
| 2095 | 2178 | "\x15LINE_KIND_UNSPECIFIED\x10\x00\x12\x15\n" + | |
| 2096 | 2179 | "\x11LINE_KIND_CONTEXT\x10\x01\x12\x16\n" + | |
| @@ -2120,73 +2203,75 @@ func file_ermite_git_proto_rawDescGZIP() []byte { | |||
| 2120 | 2203 | return file_ermite_git_proto_rawDescData | |
| 2121 | 2204 | } | |
| 2122 | 2205 | ||
| 2123 | - | var file_ermite_git_proto_enumTypes = make([]protoimpl.EnumInfo, 4) | |
| 2206 | + | var file_ermite_git_proto_enumTypes = make([]protoimpl.EnumInfo, 5) | |
| 2124 | 2207 | var file_ermite_git_proto_msgTypes = make([]protoimpl.MessageInfo, 22) | |
| 2125 | 2208 | var file_ermite_git_proto_goTypes = []any{ | |
| 2126 | 2209 | (RefKind)(0), // 0: ermite.RefKind | |
| 2127 | 2210 | (EntryKind)(0), // 1: ermite.EntryKind | |
| 2128 | 2211 | (FileStatus)(0), // 2: ermite.FileStatus | |
| 2129 | - | (LineKind)(0), // 3: ermite.LineKind | |
| 2130 | - | (*Ref)(nil), // 4: ermite.Ref | |
| 2131 | - | (*ListRefsRequest)(nil), // 5: ermite.ListRefsRequest | |
| 2132 | - | (*ListRefsResponse)(nil), // 6: ermite.ListRefsResponse | |
| 2133 | - | (*TreeEntry)(nil), // 7: ermite.TreeEntry | |
| 2134 | - | (*GetTreeRequest)(nil), // 8: ermite.GetTreeRequest | |
| 2135 | - | (*GetTreeResponse)(nil), // 9: ermite.GetTreeResponse | |
| 2136 | - | (*ListPathsRequest)(nil), // 10: ermite.ListPathsRequest | |
| 2137 | - | (*ListPathsResponse)(nil), // 11: ermite.ListPathsResponse | |
| 2138 | - | (*BlobInfo)(nil), // 12: ermite.BlobInfo | |
| 2139 | - | (*GetBlobRequest)(nil), // 13: ermite.GetBlobRequest | |
| 2140 | - | (*GetBlobResponse)(nil), // 14: ermite.GetBlobResponse | |
| 2141 | - | (*ListCommitsRequest)(nil), // 15: ermite.ListCommitsRequest | |
| 2142 | - | (*ListCommitsResponse)(nil), // 16: ermite.ListCommitsResponse | |
| 2143 | - | (*GetCommitRequest)(nil), // 17: ermite.GetCommitRequest | |
| 2144 | - | (*GetCommitResponse)(nil), // 18: ermite.GetCommitResponse | |
| 2145 | - | (*DiffStats)(nil), // 19: ermite.DiffStats | |
| 2146 | - | (*Diff)(nil), // 20: ermite.Diff | |
| 2147 | - | (*FileDiff)(nil), // 21: ermite.FileDiff | |
| 2148 | - | (*Hunk)(nil), // 22: ermite.Hunk | |
| 2149 | - | (*Line)(nil), // 23: ermite.Line | |
| 2150 | - | (*ResolveRevisionRequest)(nil), // 24: ermite.ResolveRevisionRequest | |
| 2151 | - | (*ResolveRevisionResponse)(nil), // 25: ermite.ResolveRevisionResponse | |
| 2152 | - | (*Commit)(nil), // 26: ermite.Commit | |
| 2212 | + | (FileOmission)(0), // 3: ermite.FileOmission | |
| 2213 | + | (LineKind)(0), // 4: ermite.LineKind | |
| 2214 | + | (*Ref)(nil), // 5: ermite.Ref | |
| 2215 | + | (*ListRefsRequest)(nil), // 6: ermite.ListRefsRequest | |
| 2216 | + | (*ListRefsResponse)(nil), // 7: ermite.ListRefsResponse | |
| 2217 | + | (*TreeEntry)(nil), // 8: ermite.TreeEntry | |
| 2218 | + | (*GetTreeRequest)(nil), // 9: ermite.GetTreeRequest | |
| 2219 | + | (*GetTreeResponse)(nil), // 10: ermite.GetTreeResponse | |
| 2220 | + | (*ListPathsRequest)(nil), // 11: ermite.ListPathsRequest | |
| 2221 | + | (*ListPathsResponse)(nil), // 12: ermite.ListPathsResponse | |
| 2222 | + | (*BlobInfo)(nil), // 13: ermite.BlobInfo | |
| 2223 | + | (*GetBlobRequest)(nil), // 14: ermite.GetBlobRequest | |
| 2224 | + | (*GetBlobResponse)(nil), // 15: ermite.GetBlobResponse | |
| 2225 | + | (*ListCommitsRequest)(nil), // 16: ermite.ListCommitsRequest | |
| 2226 | + | (*ListCommitsResponse)(nil), // 17: ermite.ListCommitsResponse | |
| 2227 | + | (*GetCommitRequest)(nil), // 18: ermite.GetCommitRequest | |
| 2228 | + | (*GetCommitResponse)(nil), // 19: ermite.GetCommitResponse | |
| 2229 | + | (*DiffStats)(nil), // 20: ermite.DiffStats | |
| 2230 | + | (*Diff)(nil), // 21: ermite.Diff | |
| 2231 | + | (*FileDiff)(nil), // 22: ermite.FileDiff | |
| 2232 | + | (*Hunk)(nil), // 23: ermite.Hunk | |
| 2233 | + | (*Line)(nil), // 24: ermite.Line | |
| 2234 | + | (*ResolveRevisionRequest)(nil), // 25: ermite.ResolveRevisionRequest | |
| 2235 | + | (*ResolveRevisionResponse)(nil), // 26: ermite.ResolveRevisionResponse | |
| 2236 | + | (*Commit)(nil), // 27: ermite.Commit | |
| 2153 | 2237 | } | |
| 2154 | 2238 | var file_ermite_git_proto_depIdxs = []int32{ | |
| 2155 | 2239 | 0, // 0: ermite.Ref.kind:type_name -> ermite.RefKind | |
| 2156 | 2240 | 0, // 1: ermite.ListRefsRequest.kinds:type_name -> ermite.RefKind | |
| 2157 | - | 4, // 2: ermite.ListRefsResponse.refs:type_name -> ermite.Ref | |
| 2241 | + | 5, // 2: ermite.ListRefsResponse.refs:type_name -> ermite.Ref | |
| 2158 | 2242 | 1, // 3: ermite.TreeEntry.kind:type_name -> ermite.EntryKind | |
| 2159 | - | 26, // 4: ermite.TreeEntry.last_commit:type_name -> ermite.Commit | |
| 2160 | - | 7, // 5: ermite.GetTreeResponse.entries:type_name -> ermite.TreeEntry | |
| 2161 | - | 12, // 6: ermite.GetBlobResponse.info:type_name -> ermite.BlobInfo | |
| 2162 | - | 26, // 7: ermite.ListCommitsResponse.commits:type_name -> ermite.Commit | |
| 2163 | - | 26, // 8: ermite.GetCommitResponse.commit:type_name -> ermite.Commit | |
| 2164 | - | 19, // 9: ermite.GetCommitResponse.stats:type_name -> ermite.DiffStats | |
| 2165 | - | 20, // 10: ermite.GetCommitResponse.diff:type_name -> ermite.Diff | |
| 2166 | - | 21, // 11: ermite.Diff.files:type_name -> ermite.FileDiff | |
| 2243 | + | 27, // 4: ermite.TreeEntry.last_commit:type_name -> ermite.Commit | |
| 2244 | + | 8, // 5: ermite.GetTreeResponse.entries:type_name -> ermite.TreeEntry | |
| 2245 | + | 13, // 6: ermite.GetBlobResponse.info:type_name -> ermite.BlobInfo | |
| 2246 | + | 27, // 7: ermite.ListCommitsResponse.commits:type_name -> ermite.Commit | |
| 2247 | + | 27, // 8: ermite.GetCommitResponse.commit:type_name -> ermite.Commit | |
| 2248 | + | 20, // 9: ermite.GetCommitResponse.stats:type_name -> ermite.DiffStats | |
| 2249 | + | 21, // 10: ermite.GetCommitResponse.diff:type_name -> ermite.Diff | |
| 2250 | + | 22, // 11: ermite.Diff.files:type_name -> ermite.FileDiff | |
| 2167 | 2251 | 2, // 12: ermite.FileDiff.status:type_name -> ermite.FileStatus | |
| 2168 | - | 22, // 13: ermite.FileDiff.hunks:type_name -> ermite.Hunk | |
| 2169 | - | 23, // 14: ermite.Hunk.lines:type_name -> ermite.Line | |
| 2170 | - | 3, // 15: ermite.Line.kind:type_name -> ermite.LineKind | |
| 2171 | - | 5, // 16: ermite.GitService.ListRefs:input_type -> ermite.ListRefsRequest | |
| 2172 | - | 8, // 17: ermite.GitService.GetTree:input_type -> ermite.GetTreeRequest | |
| 2173 | - | 10, // 18: ermite.GitService.ListPaths:input_type -> ermite.ListPathsRequest | |
| 2174 | - | 13, // 19: ermite.GitService.GetBlob:input_type -> ermite.GetBlobRequest | |
| 2175 | - | 15, // 20: ermite.GitService.ListCommits:input_type -> ermite.ListCommitsRequest | |
| 2176 | - | 17, // 21: ermite.GitService.GetCommit:input_type -> ermite.GetCommitRequest | |
| 2177 | - | 24, // 22: ermite.GitService.ResolveRevision:input_type -> ermite.ResolveRevisionRequest | |
| 2178 | - | 6, // 23: ermite.GitService.ListRefs:output_type -> ermite.ListRefsResponse | |
| 2179 | - | 9, // 24: ermite.GitService.GetTree:output_type -> ermite.GetTreeResponse | |
| 2180 | - | 11, // 25: ermite.GitService.ListPaths:output_type -> ermite.ListPathsResponse | |
| 2181 | - | 14, // 26: ermite.GitService.GetBlob:output_type -> ermite.GetBlobResponse | |
| 2182 | - | 16, // 27: ermite.GitService.ListCommits:output_type -> ermite.ListCommitsResponse | |
| 2183 | - | 18, // 28: ermite.GitService.GetCommit:output_type -> ermite.GetCommitResponse | |
| 2184 | - | 25, // 29: ermite.GitService.ResolveRevision:output_type -> ermite.ResolveRevisionResponse | |
| 2185 | - | 23, // [23:30] is the sub-list for method output_type | |
| 2186 | - | 16, // [16:23] is the sub-list for method input_type | |
| 2187 | - | 16, // [16:16] is the sub-list for extension type_name | |
| 2188 | - | 16, // [16:16] is the sub-list for extension extendee | |
| 2189 | - | 0, // [0:16] is the sub-list for field type_name | |
| 2252 | + | 23, // 13: ermite.FileDiff.hunks:type_name -> ermite.Hunk | |
| 2253 | + | 3, // 14: ermite.FileDiff.omitted:type_name -> ermite.FileOmission | |
| 2254 | + | 24, // 15: ermite.Hunk.lines:type_name -> ermite.Line | |
| 2255 | + | 4, // 16: ermite.Line.kind:type_name -> ermite.LineKind | |
| 2256 | + | 6, // 17: ermite.GitService.ListRefs:input_type -> ermite.ListRefsRequest | |
| 2257 | + | 9, // 18: ermite.GitService.GetTree:input_type -> ermite.GetTreeRequest | |
| 2258 | + | 11, // 19: ermite.GitService.ListPaths:input_type -> ermite.ListPathsRequest | |
| 2259 | + | 14, // 20: ermite.GitService.GetBlob:input_type -> ermite.GetBlobRequest | |
| 2260 | + | 16, // 21: ermite.GitService.ListCommits:input_type -> ermite.ListCommitsRequest | |
| 2261 | + | 18, // 22: ermite.GitService.GetCommit:input_type -> ermite.GetCommitRequest | |
| 2262 | + | 25, // 23: ermite.GitService.ResolveRevision:input_type -> ermite.ResolveRevisionRequest | |
| 2263 | + | 7, // 24: ermite.GitService.ListRefs:output_type -> ermite.ListRefsResponse | |
| 2264 | + | 10, // 25: ermite.GitService.GetTree:output_type -> ermite.GetTreeResponse | |
| 2265 | + | 12, // 26: ermite.GitService.ListPaths:output_type -> ermite.ListPathsResponse | |
| 2266 | + | 15, // 27: ermite.GitService.GetBlob:output_type -> ermite.GetBlobResponse | |
| 2267 | + | 17, // 28: ermite.GitService.ListCommits:output_type -> ermite.ListCommitsResponse | |
| 2268 | + | 19, // 29: ermite.GitService.GetCommit:output_type -> ermite.GetCommitResponse | |
| 2269 | + | 26, // 30: ermite.GitService.ResolveRevision:output_type -> ermite.ResolveRevisionResponse | |
| 2270 | + | 24, // [24:31] is the sub-list for method output_type | |
| 2271 | + | 17, // [17:24] is the sub-list for method input_type | |
| 2272 | + | 17, // [17:17] is the sub-list for extension type_name | |
| 2273 | + | 17, // [17:17] is the sub-list for extension extendee | |
| 2274 | + | 0, // [0:17] is the sub-list for field type_name | |
| 2190 | 2275 | } | |
| 2191 | 2276 | ||
| 2192 | 2277 | func init() { file_ermite_git_proto_init() } | |
| @@ -2200,7 +2285,7 @@ func file_ermite_git_proto_init() { | |||
| 2200 | 2285 | File: protoimpl.DescBuilder{ | |
| 2201 | 2286 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | |
| 2202 | 2287 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_ermite_git_proto_rawDesc), len(file_ermite_git_proto_rawDesc)), | |
| 2203 | - | NumEnums: 4, | |
| 2288 | + | NumEnums: 5, | |
| 2204 | 2289 | NumMessages: 22, | |
| 2205 | 2290 | NumExtensions: 0, | |
| 2206 | 2291 | NumServices: 1, | |
| @@ -215,6 +215,71 @@ func (FileStatus) EnumDescriptor() ([]byte, []int) { | |||||
| 215 | return file_ermite_git_proto_rawDescGZIP(), []int{2} | 215 | return file_ermite_git_proto_rawDescGZIP(), []int{2} | ||
| 216 | } | 216 | } | ||
| 217 | 217 | ||||
| 218 | + | // FileOmission tells why a changed file has no hunks although it changed. | |||
| 219 | + | type FileOmission int32 | |||
| 220 | + | ||||
| 221 | + | const ( | |||
| 222 | + | // The file is not omitted: its hunks are present, or it has none to show | |||
| 223 | + | // (binary, pure rename, mode change), or it is outside the requested window. | |||
| 224 | + | FileOmission_FILE_OMISSION_UNSPECIFIED FileOmission = 0 | |||
| 225 | + | // The file is generated or vendored, by its path: its hunks were not read. | |||
| 226 | + | // It can be read on its own. | |||
| 227 | + | FileOmission_FILE_OMISSION_GENERATED FileOmission = 1 | |||
| 228 | + | // The file changes more lines than the per-file limit. It can be read on its own. | |||
| 229 | + | FileOmission_FILE_OMISSION_LARGE FileOmission = 2 | |||
| 230 | + | // The file did not fit in what remained of the total limits of the diff. | |||
| 231 | + | // It can be read on its own. | |||
| 232 | + | FileOmission_FILE_OMISSION_BUDGET FileOmission = 3 | |||
| 233 | + | // The file's text exceeds the memory limit of a diff: it cannot be shown, | |||
| 234 | + | // even on its own. Clone the repository to read it. | |||
| 235 | + | FileOmission_FILE_OMISSION_UNAVAILABLE FileOmission = 4 | |||
| 236 | + | ) | |||
| 237 | + | ||||
| 238 | + | // Enum value maps for FileOmission. | |||
| 239 | + | var ( | |||
| 240 | + | FileOmission_name = map[int32]string{ | |||
| 241 | + | 0: "FILE_OMISSION_UNSPECIFIED", | |||
| 242 | + | 1: "FILE_OMISSION_GENERATED", | |||
| 243 | + | 2: "FILE_OMISSION_LARGE", | |||
| 244 | + | 3: "FILE_OMISSION_BUDGET", | |||
| 245 | + | 4: "FILE_OMISSION_UNAVAILABLE", | |||
| 246 | + | } | |||
| 247 | + | FileOmission_value = map[string]int32{ | |||
| 248 | + | "FILE_OMISSION_UNSPECIFIED": 0, | |||
| 249 | + | "FILE_OMISSION_GENERATED": 1, | |||
| 250 | + | "FILE_OMISSION_LARGE": 2, | |||
| 251 | + | "FILE_OMISSION_BUDGET": 3, | |||
| 252 | + | "FILE_OMISSION_UNAVAILABLE": 4, | |||
| 253 | + | } | |||
| 254 | + | ) | |||
| 255 | + | ||||
| 256 | + | func (x FileOmission) Enum() *FileOmission { | |||
| 257 | + | p := new(FileOmission) | |||
| 258 | + | *p = x | |||
| 259 | + | return p | |||
| 260 | + | } | |||
| 261 | + | ||||
| 262 | + | func (x FileOmission) String() string { | |||
| 263 | + | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) | |||
| 264 | + | } | |||
| 265 | + | ||||
| 266 | + | func (FileOmission) Descriptor() protoreflect.EnumDescriptor { | |||
| 267 | + | return file_ermite_git_proto_enumTypes[3].Descriptor() | |||
| 268 | + | } | |||
| 269 | + | ||||
| 270 | + | func (FileOmission) Type() protoreflect.EnumType { | |||
| 271 | + | return &file_ermite_git_proto_enumTypes[3] | |||
| 272 | + | } | |||
| 273 | + | ||||
| 274 | + | func (x FileOmission) Number() protoreflect.EnumNumber { | |||
| 275 | + | return protoreflect.EnumNumber(x) | |||
| 276 | + | } | |||
| 277 | + | ||||
| 278 | + | // Deprecated: Use FileOmission.Descriptor instead. | |||
| 279 | + | func (FileOmission) EnumDescriptor() ([]byte, []int) { | |||
| 280 | + | return file_ermite_git_proto_rawDescGZIP(), []int{3} | |||
| 281 | + | } | |||
| 282 | + | ||||
| 218 | // LineKind tells how a line of a hunk relates to the two sides of a diff. | 283 | // LineKind tells how a line of a hunk relates to the two sides of a diff. | ||
| 219 | type LineKind int32 | 284 | type LineKind int32 | ||
| 220 | 285 | ||||
| @@ -256,11 +321,11 @@ func (x LineKind) String() string { | |||||
| 256 | } | 321 | } | ||
| 257 | 322 | ||||
| 258 | func (LineKind) Descriptor() protoreflect.EnumDescriptor { | 323 | func (LineKind) Descriptor() protoreflect.EnumDescriptor { | ||
| 259 | - | return file_ermite_git_proto_enumTypes[3].Descriptor() | 324 | + | return file_ermite_git_proto_enumTypes[4].Descriptor() |
| 260 | } | 325 | } | ||
| 261 | 326 | ||||
| 262 | func (LineKind) Type() protoreflect.EnumType { | 327 | func (LineKind) Type() protoreflect.EnumType { | ||
| 263 | - | return &file_ermite_git_proto_enumTypes[3] | 328 | + | return &file_ermite_git_proto_enumTypes[4] |
| 264 | } | 329 | } | ||
| 265 | 330 | ||||
| 266 | func (x LineKind) Number() protoreflect.EnumNumber { | 331 | func (x LineKind) Number() protoreflect.EnumNumber { | ||
| @@ -269,7 +334,7 @@ func (x LineKind) Number() protoreflect.EnumNumber { | |||||
| 269 | 334 | ||||
| 270 | // Deprecated: Use LineKind.Descriptor instead. | 335 | // Deprecated: Use LineKind.Descriptor instead. | ||
| 271 | func (LineKind) EnumDescriptor() ([]byte, []int) { | 336 | func (LineKind) EnumDescriptor() ([]byte, []int) { | ||
| 272 | - | return file_ermite_git_proto_rawDescGZIP(), []int{3} | 337 | + | return file_ermite_git_proto_rawDescGZIP(), []int{4} |
| 273 | } | 338 | } | ||
| 274 | 339 | ||||
| 275 | // Ref is a branch, a tag or HEAD. | 340 | // Ref is a branch, a tag or HEAD. | ||
| @@ -1444,8 +1509,8 @@ type Diff struct { | |||||
| 1444 | // Files are the changed files, ordered by path. Files past the file limit are | 1509 | // Files are the changed files, ordered by path. Files past the file limit are | ||
| 1445 | // omitted. | 1510 | // omitted. | ||
| 1446 | Files []*FileDiff `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` | 1511 | Files []*FileDiff `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` | ||
| 1447 | - | // Truncated is true when the diff is incomplete: files were omitted, or at | 1512 | + | // Truncated is true when the diff is incomplete: files were omitted past the |
| 1448 | - | // least one listed file has truncated set. DiffStats still count everything. | 1513 | + | // file limit, or at least one listed file has omitted set. DiffStats still count everything. |
| 1449 | Truncated bool `protobuf:"varint,2,opt,name=truncated,proto3" json:"truncated,omitempty"` | 1514 | Truncated bool `protobuf:"varint,2,opt,name=truncated,proto3" json:"truncated,omitempty"` | ||
| 1450 | unknownFields protoimpl.UnknownFields | 1515 | unknownFields protoimpl.UnknownFields | ||
| 1451 | sizeCache protoimpl.SizeCache | 1516 | sizeCache protoimpl.SizeCache | ||
| @@ -1523,11 +1588,15 @@ type FileDiff struct { | |||||
| 1523 | // copied file, and 0 otherwise. | 1588 | // copied file, and 0 otherwise. | ||
| 1524 | Similarity int32 `protobuf:"varint,11,opt,name=similarity,proto3" json:"similarity,omitempty"` | 1589 | Similarity int32 `protobuf:"varint,11,opt,name=similarity,proto3" json:"similarity,omitempty"` | ||
| 1525 | // Truncated is true when the file exceeded a diff limit: hunks is then empty | 1590 | // Truncated is true when the file exceeded a diff limit: hunks is then empty | ||
| 1526 | - | // although the file changed. Additions and deletions remain accurate. | 1591 | + | // although the file changed. Additions and deletions remain accurate. It is |
| 1592 | + | // kept for compatibility and equals omitted != FILE_OMISSION_UNSPECIFIED. | |||
| 1527 | Truncated bool `protobuf:"varint,12,opt,name=truncated,proto3" json:"truncated,omitempty"` | 1593 | Truncated bool `protobuf:"varint,12,opt,name=truncated,proto3" json:"truncated,omitempty"` | ||
| 1528 | // Hunks are the changed regions, in file order. Empty for a binary file, a | 1594 | // Hunks are the changed regions, in file order. Empty for a binary file, a | ||
| 1529 | // truncated file, a pure rename and a mode-only change. | 1595 | // truncated file, a pure rename and a mode-only change. | ||
| 1530 | - | Hunks []*Hunk `protobuf:"bytes,13,rep,name=hunks,proto3" json:"hunks,omitempty"` | 1596 | + | Hunks []*Hunk `protobuf:"bytes,13,rep,name=hunks,proto3" json:"hunks,omitempty"` |
| 1597 | + | // Omitted tells why hunks is empty although the file changed. truncated is | |||
| 1598 | + | // true exactly when omitted is not FILE_OMISSION_UNSPECIFIED. | |||
| 1599 | + | Omitted FileOmission `protobuf:"varint,14,opt,name=omitted,proto3,enum=ermite.FileOmission" json:"omitted,omitempty"` | |||
| 1531 | unknownFields protoimpl.UnknownFields | 1600 | unknownFields protoimpl.UnknownFields | ||
| 1532 | sizeCache protoimpl.SizeCache | 1601 | sizeCache protoimpl.SizeCache | ||
| 1533 | } | 1602 | } | ||
| @@ -1653,6 +1722,13 @@ func (x *FileDiff) GetHunks() []*Hunk { | |||||
| 1653 | return nil | 1722 | return nil | ||
| 1654 | } | 1723 | } | ||
| 1655 | 1724 | ||||
| 1725 | + | func (x *FileDiff) GetOmitted() FileOmission { | |||
| 1726 | + | if x != nil { | |||
| 1727 | + | return x.Omitted | |||
| 1728 | + | } | |||
| 1729 | + | return FileOmission_FILE_OMISSION_UNSPECIFIED | |||
| 1730 | + | } | |||
| 1731 | + | ||||
| 1656 | // Hunk is a contiguous changed region with its context. | 1732 | // Hunk is a contiguous changed region with its context. | ||
| 1657 | type Hunk struct { | 1733 | type Hunk struct { | ||
| 1658 | state protoimpl.MessageState `protogen:"open.v1"` | 1734 | state protoimpl.MessageState `protogen:"open.v1"` | ||
| @@ -2031,7 +2107,7 @@ const file_ermite_git_proto_rawDesc = "" + | |||||
| 2031 | "\tdeletions\x18\x03 \x01(\x05R\tdeletions\"L\n" + | 2107 | "\tdeletions\x18\x03 \x01(\x05R\tdeletions\"L\n" + | ||
| 2032 | "\x04Diff\x12&\n" + | 2108 | "\x04Diff\x12&\n" + | ||
| 2033 | "\x05files\x18\x01 \x03(\v2\x10.ermite.FileDiffR\x05files\x12\x1c\n" + | 2109 | "\x05files\x18\x01 \x03(\v2\x10.ermite.FileDiffR\x05files\x12\x1c\n" + | ||
| 2034 | - | "\ttruncated\x18\x02 \x01(\bR\ttruncated\"\x86\x03\n" + | 2110 | + | "\ttruncated\x18\x02 \x01(\bR\ttruncated\"\xb6\x03\n" + |
| 2035 | "\bFileDiff\x12\x19\n" + | 2111 | "\bFileDiff\x12\x19\n" + | ||
| 2036 | "\bold_path\x18\x01 \x01(\tR\aoldPath\x12\x19\n" + | 2112 | "\bold_path\x18\x01 \x01(\tR\aoldPath\x12\x19\n" + | ||
| 2037 | "\bnew_path\x18\x02 \x01(\tR\anewPath\x12*\n" + | 2113 | "\bnew_path\x18\x02 \x01(\tR\anewPath\x12*\n" + | ||
| @@ -2048,7 +2124,8 @@ const file_ermite_git_proto_rawDesc = "" + | |||||
| 2048 | "similarity\x18\v \x01(\x05R\n" + | 2124 | "similarity\x18\v \x01(\x05R\n" + | ||
| 2049 | "similarity\x12\x1c\n" + | 2125 | "similarity\x12\x1c\n" + | ||
| 2050 | "\ttruncated\x18\f \x01(\bR\ttruncated\x12\"\n" + | 2126 | "\ttruncated\x18\f \x01(\bR\ttruncated\x12\"\n" + | ||
| 2051 | - | "\x05hunks\x18\r \x03(\v2\f.ermite.HunkR\x05hunks\"\xb6\x01\n" + | 2127 | + | "\x05hunks\x18\r \x03(\v2\f.ermite.HunkR\x05hunks\x12.\n" + |
| 2128 | + | "\aomitted\x18\x0e \x01(\x0e2\x14.ermite.FileOmissionR\aomitted\"\xb6\x01\n" + | |||
| 2052 | "\x04Hunk\x12\x1b\n" + | 2129 | "\x04Hunk\x12\x1b\n" + | ||
| 2053 | "\told_start\x18\x01 \x01(\x05R\boldStart\x12\x1b\n" + | 2130 | "\told_start\x18\x01 \x01(\x05R\boldStart\x12\x1b\n" + | ||
| 2054 | "\told_lines\x18\x02 \x01(\x05R\boldLines\x12\x1b\n" + | 2131 | "\told_lines\x18\x02 \x01(\x05R\boldLines\x12\x1b\n" + | ||
| @@ -2090,7 +2167,13 @@ const file_ermite_git_proto_rawDesc = "" + | |||||
| 2090 | "\x14FILE_STATUS_MODIFIED\x10\x03\x12\x17\n" + | 2167 | "\x14FILE_STATUS_MODIFIED\x10\x03\x12\x17\n" + | ||
| 2091 | "\x13FILE_STATUS_RENAMED\x10\x04\x12\x16\n" + | 2168 | "\x13FILE_STATUS_RENAMED\x10\x04\x12\x16\n" + | ||
| 2092 | "\x12FILE_STATUS_COPIED\x10\x05\x12\x1c\n" + | 2169 | "\x12FILE_STATUS_COPIED\x10\x05\x12\x1c\n" + | ||
| 2093 | - | "\x18FILE_STATUS_TYPE_CHANGED\x10\x06*l\n" + | 2170 | + | "\x18FILE_STATUS_TYPE_CHANGED\x10\x06*\x9c\x01\n" + |
| 2171 | + | "\fFileOmission\x12\x1d\n" + | |||
| 2172 | + | "\x19FILE_OMISSION_UNSPECIFIED\x10\x00\x12\x1b\n" + | |||
| 2173 | + | "\x17FILE_OMISSION_GENERATED\x10\x01\x12\x17\n" + | |||
| 2174 | + | "\x13FILE_OMISSION_LARGE\x10\x02\x12\x18\n" + | |||
| 2175 | + | "\x14FILE_OMISSION_BUDGET\x10\x03\x12\x1d\n" + | |||
| 2176 | + | "\x19FILE_OMISSION_UNAVAILABLE\x10\x04*l\n" + | |||
| 2094 | "\bLineKind\x12\x19\n" + | 2177 | "\bLineKind\x12\x19\n" + | ||
| 2095 | "\x15LINE_KIND_UNSPECIFIED\x10\x00\x12\x15\n" + | 2178 | "\x15LINE_KIND_UNSPECIFIED\x10\x00\x12\x15\n" + | ||
| 2096 | "\x11LINE_KIND_CONTEXT\x10\x01\x12\x16\n" + | 2179 | "\x11LINE_KIND_CONTEXT\x10\x01\x12\x16\n" + | ||
| @@ -2120,73 +2203,75 @@ func file_ermite_git_proto_rawDescGZIP() []byte { | |||||
| 2120 | return file_ermite_git_proto_rawDescData | 2203 | return file_ermite_git_proto_rawDescData | ||
| 2121 | } | 2204 | } | ||
| 2122 | 2205 | ||||
| 2123 | - | var file_ermite_git_proto_enumTypes = make([]protoimpl.EnumInfo, 4) | 2206 | + | var file_ermite_git_proto_enumTypes = make([]protoimpl.EnumInfo, 5) |
| 2124 | var file_ermite_git_proto_msgTypes = make([]protoimpl.MessageInfo, 22) | 2207 | var file_ermite_git_proto_msgTypes = make([]protoimpl.MessageInfo, 22) | ||
| 2125 | var file_ermite_git_proto_goTypes = []any{ | 2208 | var file_ermite_git_proto_goTypes = []any{ | ||
| 2126 | (RefKind)(0), // 0: ermite.RefKind | 2209 | (RefKind)(0), // 0: ermite.RefKind | ||
| 2127 | (EntryKind)(0), // 1: ermite.EntryKind | 2210 | (EntryKind)(0), // 1: ermite.EntryKind | ||
| 2128 | (FileStatus)(0), // 2: ermite.FileStatus | 2211 | (FileStatus)(0), // 2: ermite.FileStatus | ||
| 2129 | - | (LineKind)(0), // 3: ermite.LineKind | 2212 | + | (FileOmission)(0), // 3: ermite.FileOmission |
| 2130 | - | (*Ref)(nil), // 4: ermite.Ref | 2213 | + | (LineKind)(0), // 4: ermite.LineKind |
| 2131 | - | (*ListRefsRequest)(nil), // 5: ermite.ListRefsRequest | 2214 | + | (*Ref)(nil), // 5: ermite.Ref |
| 2132 | - | (*ListRefsResponse)(nil), // 6: ermite.ListRefsResponse | 2215 | + | (*ListRefsRequest)(nil), // 6: ermite.ListRefsRequest |
| 2133 | - | (*TreeEntry)(nil), // 7: ermite.TreeEntry | 2216 | + | (*ListRefsResponse)(nil), // 7: ermite.ListRefsResponse |
| 2134 | - | (*GetTreeRequest)(nil), // 8: ermite.GetTreeRequest | 2217 | + | (*TreeEntry)(nil), // 8: ermite.TreeEntry |
| 2135 | - | (*GetTreeResponse)(nil), // 9: ermite.GetTreeResponse | 2218 | + | (*GetTreeRequest)(nil), // 9: ermite.GetTreeRequest |
| 2136 | - | (*ListPathsRequest)(nil), // 10: ermite.ListPathsRequest | 2219 | + | (*GetTreeResponse)(nil), // 10: ermite.GetTreeResponse |
| 2137 | - | (*ListPathsResponse)(nil), // 11: ermite.ListPathsResponse | 2220 | + | (*ListPathsRequest)(nil), // 11: ermite.ListPathsRequest |
| 2138 | - | (*BlobInfo)(nil), // 12: ermite.BlobInfo | 2221 | + | (*ListPathsResponse)(nil), // 12: ermite.ListPathsResponse |
| 2139 | - | (*GetBlobRequest)(nil), // 13: ermite.GetBlobRequest | 2222 | + | (*BlobInfo)(nil), // 13: ermite.BlobInfo |
| 2140 | - | (*GetBlobResponse)(nil), // 14: ermite.GetBlobResponse | 2223 | + | (*GetBlobRequest)(nil), // 14: ermite.GetBlobRequest |
| 2141 | - | (*ListCommitsRequest)(nil), // 15: ermite.ListCommitsRequest | 2224 | + | (*GetBlobResponse)(nil), // 15: ermite.GetBlobResponse |
| 2142 | - | (*ListCommitsResponse)(nil), // 16: ermite.ListCommitsResponse | 2225 | + | (*ListCommitsRequest)(nil), // 16: ermite.ListCommitsRequest |
| 2143 | - | (*GetCommitRequest)(nil), // 17: ermite.GetCommitRequest | 2226 | + | (*ListCommitsResponse)(nil), // 17: ermite.ListCommitsResponse |
| 2144 | - | (*GetCommitResponse)(nil), // 18: ermite.GetCommitResponse | 2227 | + | (*GetCommitRequest)(nil), // 18: ermite.GetCommitRequest |
| 2145 | - | (*DiffStats)(nil), // 19: ermite.DiffStats | 2228 | + | (*GetCommitResponse)(nil), // 19: ermite.GetCommitResponse |
| 2146 | - | (*Diff)(nil), // 20: ermite.Diff | 2229 | + | (*DiffStats)(nil), // 20: ermite.DiffStats |
| 2147 | - | (*FileDiff)(nil), // 21: ermite.FileDiff | 2230 | + | (*Diff)(nil), // 21: ermite.Diff |
| 2148 | - | (*Hunk)(nil), // 22: ermite.Hunk | 2231 | + | (*FileDiff)(nil), // 22: ermite.FileDiff |
| 2149 | - | (*Line)(nil), // 23: ermite.Line | 2232 | + | (*Hunk)(nil), // 23: ermite.Hunk |
| 2150 | - | (*ResolveRevisionRequest)(nil), // 24: ermite.ResolveRevisionRequest | 2233 | + | (*Line)(nil), // 24: ermite.Line |
| 2151 | - | (*ResolveRevisionResponse)(nil), // 25: ermite.ResolveRevisionResponse | 2234 | + | (*ResolveRevisionRequest)(nil), // 25: ermite.ResolveRevisionRequest |
| 2152 | - | (*Commit)(nil), // 26: ermite.Commit | 2235 | + | (*ResolveRevisionResponse)(nil), // 26: ermite.ResolveRevisionResponse |
| 2236 | + | (*Commit)(nil), // 27: ermite.Commit | |||
| 2153 | } | 2237 | } | ||
| 2154 | var file_ermite_git_proto_depIdxs = []int32{ | 2238 | var file_ermite_git_proto_depIdxs = []int32{ | ||
| 2155 | 0, // 0: ermite.Ref.kind:type_name -> ermite.RefKind | 2239 | 0, // 0: ermite.Ref.kind:type_name -> ermite.RefKind | ||
| 2156 | 0, // 1: ermite.ListRefsRequest.kinds:type_name -> ermite.RefKind | 2240 | 0, // 1: ermite.ListRefsRequest.kinds:type_name -> ermite.RefKind | ||
| 2157 | - | 4, // 2: ermite.ListRefsResponse.refs:type_name -> ermite.Ref | 2241 | + | 5, // 2: ermite.ListRefsResponse.refs:type_name -> ermite.Ref |
| 2158 | 1, // 3: ermite.TreeEntry.kind:type_name -> ermite.EntryKind | 2242 | 1, // 3: ermite.TreeEntry.kind:type_name -> ermite.EntryKind | ||
| 2159 | - | 26, // 4: ermite.TreeEntry.last_commit:type_name -> ermite.Commit | 2243 | + | 27, // 4: ermite.TreeEntry.last_commit:type_name -> ermite.Commit |
| 2160 | - | 7, // 5: ermite.GetTreeResponse.entries:type_name -> ermite.TreeEntry | 2244 | + | 8, // 5: ermite.GetTreeResponse.entries:type_name -> ermite.TreeEntry |
| 2161 | - | 12, // 6: ermite.GetBlobResponse.info:type_name -> ermite.BlobInfo | 2245 | + | 13, // 6: ermite.GetBlobResponse.info:type_name -> ermite.BlobInfo |
| 2162 | - | 26, // 7: ermite.ListCommitsResponse.commits:type_name -> ermite.Commit | 2246 | + | 27, // 7: ermite.ListCommitsResponse.commits:type_name -> ermite.Commit |
| 2163 | - | 26, // 8: ermite.GetCommitResponse.commit:type_name -> ermite.Commit | 2247 | + | 27, // 8: ermite.GetCommitResponse.commit:type_name -> ermite.Commit |
| 2164 | - | 19, // 9: ermite.GetCommitResponse.stats:type_name -> ermite.DiffStats | 2248 | + | 20, // 9: ermite.GetCommitResponse.stats:type_name -> ermite.DiffStats |
| 2165 | - | 20, // 10: ermite.GetCommitResponse.diff:type_name -> ermite.Diff | 2249 | + | 21, // 10: ermite.GetCommitResponse.diff:type_name -> ermite.Diff |
| 2166 | - | 21, // 11: ermite.Diff.files:type_name -> ermite.FileDiff | 2250 | + | 22, // 11: ermite.Diff.files:type_name -> ermite.FileDiff |
| 2167 | 2, // 12: ermite.FileDiff.status:type_name -> ermite.FileStatus | 2251 | 2, // 12: ermite.FileDiff.status:type_name -> ermite.FileStatus | ||
| 2168 | - | 22, // 13: ermite.FileDiff.hunks:type_name -> ermite.Hunk | 2252 | + | 23, // 13: ermite.FileDiff.hunks:type_name -> ermite.Hunk |
| 2169 | - | 23, // 14: ermite.Hunk.lines:type_name -> ermite.Line | 2253 | + | 3, // 14: ermite.FileDiff.omitted:type_name -> ermite.FileOmission |
| 2170 | - | 3, // 15: ermite.Line.kind:type_name -> ermite.LineKind | 2254 | + | 24, // 15: ermite.Hunk.lines:type_name -> ermite.Line |
| 2171 | - | 5, // 16: ermite.GitService.ListRefs:input_type -> ermite.ListRefsRequest | 2255 | + | 4, // 16: ermite.Line.kind:type_name -> ermite.LineKind |
| 2172 | - | 8, // 17: ermite.GitService.GetTree:input_type -> ermite.GetTreeRequest | 2256 | + | 6, // 17: ermite.GitService.ListRefs:input_type -> ermite.ListRefsRequest |
| 2173 | - | 10, // 18: ermite.GitService.ListPaths:input_type -> ermite.ListPathsRequest | 2257 | + | 9, // 18: ermite.GitService.GetTree:input_type -> ermite.GetTreeRequest |
| 2174 | - | 13, // 19: ermite.GitService.GetBlob:input_type -> ermite.GetBlobRequest | 2258 | + | 11, // 19: ermite.GitService.ListPaths:input_type -> ermite.ListPathsRequest |
| 2175 | - | 15, // 20: ermite.GitService.ListCommits:input_type -> ermite.ListCommitsRequest | 2259 | + | 14, // 20: ermite.GitService.GetBlob:input_type -> ermite.GetBlobRequest |
| 2176 | - | 17, // 21: ermite.GitService.GetCommit:input_type -> ermite.GetCommitRequest | 2260 | + | 16, // 21: ermite.GitService.ListCommits:input_type -> ermite.ListCommitsRequest |
| 2177 | - | 24, // 22: ermite.GitService.ResolveRevision:input_type -> ermite.ResolveRevisionRequest | 2261 | + | 18, // 22: ermite.GitService.GetCommit:input_type -> ermite.GetCommitRequest |
| 2178 | - | 6, // 23: ermite.GitService.ListRefs:output_type -> ermite.ListRefsResponse | 2262 | + | 25, // 23: ermite.GitService.ResolveRevision:input_type -> ermite.ResolveRevisionRequest |
| 2179 | - | 9, // 24: ermite.GitService.GetTree:output_type -> ermite.GetTreeResponse | 2263 | + | 7, // 24: ermite.GitService.ListRefs:output_type -> ermite.ListRefsResponse |
| 2180 | - | 11, // 25: ermite.GitService.ListPaths:output_type -> ermite.ListPathsResponse | 2264 | + | 10, // 25: ermite.GitService.GetTree:output_type -> ermite.GetTreeResponse |
| 2181 | - | 14, // 26: ermite.GitService.GetBlob:output_type -> ermite.GetBlobResponse | 2265 | + | 12, // 26: ermite.GitService.ListPaths:output_type -> ermite.ListPathsResponse |
| 2182 | - | 16, // 27: ermite.GitService.ListCommits:output_type -> ermite.ListCommitsResponse | 2266 | + | 15, // 27: ermite.GitService.GetBlob:output_type -> ermite.GetBlobResponse |
| 2183 | - | 18, // 28: ermite.GitService.GetCommit:output_type -> ermite.GetCommitResponse | 2267 | + | 17, // 28: ermite.GitService.ListCommits:output_type -> ermite.ListCommitsResponse |
| 2184 | - | 25, // 29: ermite.GitService.ResolveRevision:output_type -> ermite.ResolveRevisionResponse | 2268 | + | 19, // 29: ermite.GitService.GetCommit:output_type -> ermite.GetCommitResponse |
| 2185 | - | 23, // [23:30] is the sub-list for method output_type | 2269 | + | 26, // 30: ermite.GitService.ResolveRevision:output_type -> ermite.ResolveRevisionResponse |
| 2186 | - | 16, // [16:23] is the sub-list for method input_type | 2270 | + | 24, // [24:31] is the sub-list for method output_type |
| 2187 | - | 16, // [16:16] is the sub-list for extension type_name | 2271 | + | 17, // [17:24] is the sub-list for method input_type |
| 2188 | - | 16, // [16:16] is the sub-list for extension extendee | 2272 | + | 17, // [17:17] is the sub-list for extension type_name |
| 2189 | - | 0, // [0:16] is the sub-list for field type_name | 2273 | + | 17, // [17:17] is the sub-list for extension extendee |
| 2274 | + | 0, // [0:17] is the sub-list for field type_name | |||
| 2190 | } | 2275 | } | ||
| 2191 | 2276 | ||||
| 2192 | func init() { file_ermite_git_proto_init() } | 2277 | func init() { file_ermite_git_proto_init() } | ||
| @@ -2200,7 +2285,7 @@ func file_ermite_git_proto_init() { | |||||
| 2200 | File: protoimpl.DescBuilder{ | 2285 | File: protoimpl.DescBuilder{ | ||
| 2201 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | 2286 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | ||
| 2202 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_ermite_git_proto_rawDesc), len(file_ermite_git_proto_rawDesc)), | 2287 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_ermite_git_proto_rawDesc), len(file_ermite_git_proto_rawDesc)), | ||
| 2203 | - | NumEnums: 4, | 2288 | + | NumEnums: 5, |
| 2204 | NumMessages: 22, | 2289 | NumMessages: 22, | ||
| 2205 | NumExtensions: 0, | 2290 | NumExtensions: 0, | ||
| 2206 | NumServices: 1, | 2291 | NumServices: 1, | ||
M proto/ermite/git.proto +25 -3
| @@ -53,6 +53,24 @@ enum FileStatus { | |||
| 53 | 53 | FILE_STATUS_TYPE_CHANGED = 6; | |
| 54 | 54 | } | |
| 55 | 55 | ||
| 56 | + | // FileOmission tells why a changed file has no hunks although it changed. | |
| 57 | + | enum FileOmission { | |
| 58 | + | // The file is not omitted: its hunks are present, or it has none to show | |
| 59 | + | // (binary, pure rename, mode change), or it is outside the requested window. | |
| 60 | + | FILE_OMISSION_UNSPECIFIED = 0; | |
| 61 | + | // The file is generated or vendored, by its path: its hunks were not read. | |
| 62 | + | // It can be read on its own. | |
| 63 | + | FILE_OMISSION_GENERATED = 1; | |
| 64 | + | // The file changes more lines than the per-file limit. It can be read on its own. | |
| 65 | + | FILE_OMISSION_LARGE = 2; | |
| 66 | + | // The file did not fit in what remained of the total limits of the diff. | |
| 67 | + | // It can be read on its own. | |
| 68 | + | FILE_OMISSION_BUDGET = 3; | |
| 69 | + | // The file's text exceeds the memory limit of a diff: it cannot be shown, | |
| 70 | + | // even on its own. Clone the repository to read it. | |
| 71 | + | FILE_OMISSION_UNAVAILABLE = 4; | |
| 72 | + | } | |
| 73 | + | ||
| 56 | 74 | // LineKind tells how a line of a hunk relates to the two sides of a diff. | |
| 57 | 75 | enum LineKind { | |
| 58 | 76 | // Not set. Never returned. | |
| @@ -335,8 +353,8 @@ message Diff { | |||
| 335 | 353 | // Files are the changed files, ordered by path. Files past the file limit are | |
| 336 | 354 | // omitted. | |
| 337 | 355 | repeated FileDiff files = 1; | |
| 338 | - | // Truncated is true when the diff is incomplete: files were omitted, or at | |
| 339 | - | // least one listed file has truncated set. DiffStats still count everything. | |
| 356 | + | // Truncated is true when the diff is incomplete: files were omitted past the | |
| 357 | + | // file limit, or at least one listed file has omitted set. DiffStats still count everything. | |
| 340 | 358 | bool truncated = 2; | |
| 341 | 359 | } | |
| 342 | 360 | ||
| @@ -367,11 +385,15 @@ message FileDiff { | |||
| 367 | 385 | // copied file, and 0 otherwise. | |
| 368 | 386 | int32 similarity = 11; | |
| 369 | 387 | // Truncated is true when the file exceeded a diff limit: hunks is then empty | |
| 370 | - | // although the file changed. Additions and deletions remain accurate. | |
| 388 | + | // although the file changed. Additions and deletions remain accurate. It is | |
| 389 | + | // kept for compatibility and equals omitted != FILE_OMISSION_UNSPECIFIED. | |
| 371 | 390 | bool truncated = 12; | |
| 372 | 391 | // Hunks are the changed regions, in file order. Empty for a binary file, a | |
| 373 | 392 | // truncated file, a pure rename and a mode-only change. | |
| 374 | 393 | repeated Hunk hunks = 13; | |
| 394 | + | // Omitted tells why hunks is empty although the file changed. truncated is | |
| 395 | + | // true exactly when omitted is not FILE_OMISSION_UNSPECIFIED. | |
| 396 | + | FileOmission omitted = 14; | |
| 375 | 397 | } | |
| 376 | 398 | ||
| 377 | 399 | // Hunk is a contiguous changed region with its context. | |
| @@ -53,6 +53,24 @@ enum FileStatus { | |||||
| 53 | FILE_STATUS_TYPE_CHANGED = 6; | 53 | FILE_STATUS_TYPE_CHANGED = 6; | ||
| 54 | } | 54 | } | ||
| 55 | 55 | ||||
| 56 | + | // FileOmission tells why a changed file has no hunks although it changed. | |||
| 57 | + | enum FileOmission { | |||
| 58 | + | // The file is not omitted: its hunks are present, or it has none to show | |||
| 59 | + | // (binary, pure rename, mode change), or it is outside the requested window. | |||
| 60 | + | FILE_OMISSION_UNSPECIFIED = 0; | |||
| 61 | + | // The file is generated or vendored, by its path: its hunks were not read. | |||
| 62 | + | // It can be read on its own. | |||
| 63 | + | FILE_OMISSION_GENERATED = 1; | |||
| 64 | + | // The file changes more lines than the per-file limit. It can be read on its own. | |||
| 65 | + | FILE_OMISSION_LARGE = 2; | |||
| 66 | + | // The file did not fit in what remained of the total limits of the diff. | |||
| 67 | + | // It can be read on its own. | |||
| 68 | + | FILE_OMISSION_BUDGET = 3; | |||
| 69 | + | // The file's text exceeds the memory limit of a diff: it cannot be shown, | |||
| 70 | + | // even on its own. Clone the repository to read it. | |||
| 71 | + | FILE_OMISSION_UNAVAILABLE = 4; | |||
| 72 | + | } | |||
| 73 | + | ||||
| 56 | // LineKind tells how a line of a hunk relates to the two sides of a diff. | 74 | // LineKind tells how a line of a hunk relates to the two sides of a diff. | ||
| 57 | enum LineKind { | 75 | enum LineKind { | ||
| 58 | // Not set. Never returned. | 76 | // Not set. Never returned. | ||
| @@ -335,8 +353,8 @@ message Diff { | |||||
| 335 | // Files are the changed files, ordered by path. Files past the file limit are | 353 | // Files are the changed files, ordered by path. Files past the file limit are | ||
| 336 | // omitted. | 354 | // omitted. | ||
| 337 | repeated FileDiff files = 1; | 355 | repeated FileDiff files = 1; | ||
| 338 | - | // Truncated is true when the diff is incomplete: files were omitted, or at | 356 | + | // Truncated is true when the diff is incomplete: files were omitted past the |
| 339 | - | // least one listed file has truncated set. DiffStats still count everything. | 357 | + | // file limit, or at least one listed file has omitted set. DiffStats still count everything. |
| 340 | bool truncated = 2; | 358 | bool truncated = 2; | ||
| 341 | } | 359 | } | ||
| 342 | 360 | ||||
| @@ -367,11 +385,15 @@ message FileDiff { | |||||
| 367 | // copied file, and 0 otherwise. | 385 | // copied file, and 0 otherwise. | ||
| 368 | int32 similarity = 11; | 386 | int32 similarity = 11; | ||
| 369 | // Truncated is true when the file exceeded a diff limit: hunks is then empty | 387 | // Truncated is true when the file exceeded a diff limit: hunks is then empty | ||
| 370 | - | // although the file changed. Additions and deletions remain accurate. | 388 | + | // although the file changed. Additions and deletions remain accurate. It is |
| 389 | + | // kept for compatibility and equals omitted != FILE_OMISSION_UNSPECIFIED. | |||
| 371 | bool truncated = 12; | 390 | bool truncated = 12; | ||
| 372 | // Hunks are the changed regions, in file order. Empty for a binary file, a | 391 | // Hunks are the changed regions, in file order. Empty for a binary file, a | ||
| 373 | // truncated file, a pure rename and a mode-only change. | 392 | // truncated file, a pure rename and a mode-only change. | ||
| 374 | repeated Hunk hunks = 13; | 393 | repeated Hunk hunks = 13; | ||
| 394 | + | // Omitted tells why hunks is empty although the file changed. truncated is | |||
| 395 | + | // true exactly when omitted is not FILE_OMISSION_UNSPECIFIED. | |||
| 396 | + | FileOmission omitted = 14; | |||
| 375 | } | 397 | } | ||
| 376 | 398 | ||||
| 377 | // Hunk is a contiguous changed region with its context. | 399 | // Hunk is a contiguous changed region with its context. | ||