detached 00a725f

Merge ef0b7b0cfc5e5c8e08a37f7ed456c706ac14aa76 into 5e05d65caece9a3677c109ffa343ad00358d4405

commit
00a725f8b860b6cda6c8973c7d900fe95d45b8b9
author
ermite · · 2026-10-20 06:05 UTC
merge of
5e05d65 + ef0b7b0 · diff against the first parent
signature
unsigned
2 files · +177 -70
M gen/ermite/git.pb.go +152 -67
@@ -215,6 +215,71 @@ func (FileStatus) EnumDescriptor() ([]byte, []int) {
215215 return file_ermite_git_proto_rawDescGZIP(), []int{2}
216216 }
217217
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+
218283 // LineKind tells how a line of a hunk relates to the two sides of a diff.
219284 type LineKind int32
220285
@@ -256,11 +321,11 @@ func (x LineKind) String() string {
256321 }
257322
258323 func (LineKind) Descriptor() protoreflect.EnumDescriptor {
259- return file_ermite_git_proto_enumTypes[3].Descriptor()
324+ return file_ermite_git_proto_enumTypes[4].Descriptor()
260325 }
261326
262327 func (LineKind) Type() protoreflect.EnumType {
263- return &file_ermite_git_proto_enumTypes[3]
328+ return &file_ermite_git_proto_enumTypes[4]
264329 }
265330
266331 func (x LineKind) Number() protoreflect.EnumNumber {
@@ -269,7 +334,7 @@ func (x LineKind) Number() protoreflect.EnumNumber {
269334
270335 // Deprecated: Use LineKind.Descriptor instead.
271336 func (LineKind) EnumDescriptor() ([]byte, []int) {
272- return file_ermite_git_proto_rawDescGZIP(), []int{3}
337+ return file_ermite_git_proto_rawDescGZIP(), []int{4}
273338 }
274339
275340 // Ref is a branch, a tag or HEAD.
@@ -1444,8 +1509,8 @@ type Diff struct {
14441509 // Files are the changed files, ordered by path. Files past the file limit are
14451510 // omitted.
14461511 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.
14491514 Truncated bool `protobuf:"varint,2,opt,name=truncated,proto3" json:"truncated,omitempty"`
14501515 unknownFields protoimpl.UnknownFields
14511516 sizeCache protoimpl.SizeCache
@@ -1523,11 +1588,15 @@ type FileDiff struct {
15231588 // copied file, and 0 otherwise.
15241589 Similarity int32 `protobuf:"varint,11,opt,name=similarity,proto3" json:"similarity,omitempty"`
15251590 // 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.
15271593 Truncated bool `protobuf:"varint,12,opt,name=truncated,proto3" json:"truncated,omitempty"`
15281594 // Hunks are the changed regions, in file order. Empty for a binary file, a
15291595 // 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"`
15311600 unknownFields protoimpl.UnknownFields
15321601 sizeCache protoimpl.SizeCache
15331602 }
@@ -1653,6 +1722,13 @@ func (x *FileDiff) GetHunks() []*Hunk {
16531722 return nil
16541723 }
16551724
1725+func (x *FileDiff) GetOmitted() FileOmission {
1726+ if x != nil {
1727+ return x.Omitted
1728+ }
1729+ return FileOmission_FILE_OMISSION_UNSPECIFIED
1730+}
1731+
16561732 // Hunk is a contiguous changed region with its context.
16571733 type Hunk struct {
16581734 state protoimpl.MessageState `protogen:"open.v1"`
@@ -2031,7 +2107,7 @@ const file_ermite_git_proto_rawDesc = "" +
20312107 "\tdeletions\x18\x03 \x01(\x05R\tdeletions\"L\n" +
20322108 "\x04Diff\x12&\n" +
20332109 "\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" +
20352111 "\bFileDiff\x12\x19\n" +
20362112 "\bold_path\x18\x01 \x01(\tR\aoldPath\x12\x19\n" +
20372113 "\bnew_path\x18\x02 \x01(\tR\anewPath\x12*\n" +
@@ -2048,7 +2124,8 @@ const file_ermite_git_proto_rawDesc = "" +
20482124 "similarity\x18\v \x01(\x05R\n" +
20492125 "similarity\x12\x1c\n" +
20502126 "\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" +
20522129 "\x04Hunk\x12\x1b\n" +
20532130 "\told_start\x18\x01 \x01(\x05R\boldStart\x12\x1b\n" +
20542131 "\told_lines\x18\x02 \x01(\x05R\boldLines\x12\x1b\n" +
@@ -2090,7 +2167,13 @@ const file_ermite_git_proto_rawDesc = "" +
20902167 "\x14FILE_STATUS_MODIFIED\x10\x03\x12\x17\n" +
20912168 "\x13FILE_STATUS_RENAMED\x10\x04\x12\x16\n" +
20922169 "\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" +
20942177 "\bLineKind\x12\x19\n" +
20952178 "\x15LINE_KIND_UNSPECIFIED\x10\x00\x12\x15\n" +
20962179 "\x11LINE_KIND_CONTEXT\x10\x01\x12\x16\n" +
@@ -2120,73 +2203,75 @@ func file_ermite_git_proto_rawDescGZIP() []byte {
21202203 return file_ermite_git_proto_rawDescData
21212204 }
21222205
2123-var file_ermite_git_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
2206+var file_ermite_git_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
21242207 var file_ermite_git_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
21252208 var file_ermite_git_proto_goTypes = []any{
21262209 (RefKind)(0), // 0: ermite.RefKind
21272210 (EntryKind)(0), // 1: ermite.EntryKind
21282211 (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
21532237 }
21542238 var file_ermite_git_proto_depIdxs = []int32{
21552239 0, // 0: ermite.Ref.kind:type_name -> ermite.RefKind
21562240 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
21582242 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
21672251 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
21902275 }
21912276
21922277 func init() { file_ermite_git_proto_init() }
@@ -2200,7 +2285,7 @@ func file_ermite_git_proto_init() {
22002285 File: protoimpl.DescBuilder{
22012286 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
22022287 RawDescriptor: unsafe.Slice(unsafe.StringData(file_ermite_git_proto_rawDesc), len(file_ermite_git_proto_rawDesc)),
2203- NumEnums: 4,
2288+ NumEnums: 5,
22042289 NumMessages: 22,
22052290 NumExtensions: 0,
22062291 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 int32284 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 are1509 // 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 at1512+ // 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.UnknownFields1515 unknownFields protoimpl.UnknownFields
1451 sizeCache protoimpl.SizeCache1516 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 empty1590 // 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, a1594 // 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.UnknownFields1600 unknownFields protoimpl.UnknownFields
1532 sizeCache protoimpl.SizeCache1601 sizeCache protoimpl.SizeCache
1533 }1602 }
@@ -1653,6 +1722,13 @@ func (x *FileDiff) GetHunks() []*Hunk {
1653 return nil1722 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_rawDescData2203 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.RefKind2209 (RefKind)(0), // 0: ermite.RefKind
2127 (EntryKind)(0), // 1: ermite.EntryKind2210 (EntryKind)(0), // 1: ermite.EntryKind
2128 (FileStatus)(0), // 2: ermite.FileStatus2211 (FileStatus)(0), // 2: ermite.FileStatus
2129- (LineKind)(0), // 3: ermite.LineKind2212+ (FileOmission)(0), // 3: ermite.FileOmission
2130- (*Ref)(nil), // 4: ermite.Ref2213+ (LineKind)(0), // 4: ermite.LineKind
2131- (*ListRefsRequest)(nil), // 5: ermite.ListRefsRequest2214+ (*Ref)(nil), // 5: ermite.Ref
2132- (*ListRefsResponse)(nil), // 6: ermite.ListRefsResponse2215+ (*ListRefsRequest)(nil), // 6: ermite.ListRefsRequest
2133- (*TreeEntry)(nil), // 7: ermite.TreeEntry2216+ (*ListRefsResponse)(nil), // 7: ermite.ListRefsResponse
2134- (*GetTreeRequest)(nil), // 8: ermite.GetTreeRequest2217+ (*TreeEntry)(nil), // 8: ermite.TreeEntry
2135- (*GetTreeResponse)(nil), // 9: ermite.GetTreeResponse2218+ (*GetTreeRequest)(nil), // 9: ermite.GetTreeRequest
2136- (*ListPathsRequest)(nil), // 10: ermite.ListPathsRequest2219+ (*GetTreeResponse)(nil), // 10: ermite.GetTreeResponse
2137- (*ListPathsResponse)(nil), // 11: ermite.ListPathsResponse2220+ (*ListPathsRequest)(nil), // 11: ermite.ListPathsRequest
2138- (*BlobInfo)(nil), // 12: ermite.BlobInfo2221+ (*ListPathsResponse)(nil), // 12: ermite.ListPathsResponse
2139- (*GetBlobRequest)(nil), // 13: ermite.GetBlobRequest2222+ (*BlobInfo)(nil), // 13: ermite.BlobInfo
2140- (*GetBlobResponse)(nil), // 14: ermite.GetBlobResponse2223+ (*GetBlobRequest)(nil), // 14: ermite.GetBlobRequest
2141- (*ListCommitsRequest)(nil), // 15: ermite.ListCommitsRequest2224+ (*GetBlobResponse)(nil), // 15: ermite.GetBlobResponse
2142- (*ListCommitsResponse)(nil), // 16: ermite.ListCommitsResponse2225+ (*ListCommitsRequest)(nil), // 16: ermite.ListCommitsRequest
2143- (*GetCommitRequest)(nil), // 17: ermite.GetCommitRequest2226+ (*ListCommitsResponse)(nil), // 17: ermite.ListCommitsResponse
2144- (*GetCommitResponse)(nil), // 18: ermite.GetCommitResponse2227+ (*GetCommitRequest)(nil), // 18: ermite.GetCommitRequest
2145- (*DiffStats)(nil), // 19: ermite.DiffStats2228+ (*GetCommitResponse)(nil), // 19: ermite.GetCommitResponse
2146- (*Diff)(nil), // 20: ermite.Diff2229+ (*DiffStats)(nil), // 20: ermite.DiffStats
2147- (*FileDiff)(nil), // 21: ermite.FileDiff2230+ (*Diff)(nil), // 21: ermite.Diff
2148- (*Hunk)(nil), // 22: ermite.Hunk2231+ (*FileDiff)(nil), // 22: ermite.FileDiff
2149- (*Line)(nil), // 23: ermite.Line2232+ (*Hunk)(nil), // 23: ermite.Hunk
2150- (*ResolveRevisionRequest)(nil), // 24: ermite.ResolveRevisionRequest2233+ (*Line)(nil), // 24: ermite.Line
2151- (*ResolveRevisionResponse)(nil), // 25: ermite.ResolveRevisionResponse2234+ (*ResolveRevisionRequest)(nil), // 25: ermite.ResolveRevisionRequest
2152- (*Commit)(nil), // 26: ermite.Commit2235+ (*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.RefKind2239 0, // 0: ermite.Ref.kind:type_name -> ermite.RefKind
2156 0, // 1: ermite.ListRefsRequest.kinds:type_name -> ermite.RefKind2240 0, // 1: ermite.ListRefsRequest.kinds:type_name -> ermite.RefKind
2157- 4, // 2: ermite.ListRefsResponse.refs:type_name -> ermite.Ref2241+ 5, // 2: ermite.ListRefsResponse.refs:type_name -> ermite.Ref
2158 1, // 3: ermite.TreeEntry.kind:type_name -> ermite.EntryKind2242 1, // 3: ermite.TreeEntry.kind:type_name -> ermite.EntryKind
2159- 26, // 4: ermite.TreeEntry.last_commit:type_name -> ermite.Commit2243+ 27, // 4: ermite.TreeEntry.last_commit:type_name -> ermite.Commit
2160- 7, // 5: ermite.GetTreeResponse.entries:type_name -> ermite.TreeEntry2244+ 8, // 5: ermite.GetTreeResponse.entries:type_name -> ermite.TreeEntry
2161- 12, // 6: ermite.GetBlobResponse.info:type_name -> ermite.BlobInfo2245+ 13, // 6: ermite.GetBlobResponse.info:type_name -> ermite.BlobInfo
2162- 26, // 7: ermite.ListCommitsResponse.commits:type_name -> ermite.Commit2246+ 27, // 7: ermite.ListCommitsResponse.commits:type_name -> ermite.Commit
2163- 26, // 8: ermite.GetCommitResponse.commit:type_name -> ermite.Commit2247+ 27, // 8: ermite.GetCommitResponse.commit:type_name -> ermite.Commit
2164- 19, // 9: ermite.GetCommitResponse.stats:type_name -> ermite.DiffStats2248+ 20, // 9: ermite.GetCommitResponse.stats:type_name -> ermite.DiffStats
2165- 20, // 10: ermite.GetCommitResponse.diff:type_name -> ermite.Diff2249+ 21, // 10: ermite.GetCommitResponse.diff:type_name -> ermite.Diff
2166- 21, // 11: ermite.Diff.files:type_name -> ermite.FileDiff2250+ 22, // 11: ermite.Diff.files:type_name -> ermite.FileDiff
2167 2, // 12: ermite.FileDiff.status:type_name -> ermite.FileStatus2251 2, // 12: ermite.FileDiff.status:type_name -> ermite.FileStatus
2168- 22, // 13: ermite.FileDiff.hunks:type_name -> ermite.Hunk2252+ 23, // 13: ermite.FileDiff.hunks:type_name -> ermite.Hunk
2169- 23, // 14: ermite.Hunk.lines:type_name -> ermite.Line2253+ 3, // 14: ermite.FileDiff.omitted:type_name -> ermite.FileOmission
2170- 3, // 15: ermite.Line.kind:type_name -> ermite.LineKind2254+ 24, // 15: ermite.Hunk.lines:type_name -> ermite.Line
2171- 5, // 16: ermite.GitService.ListRefs:input_type -> ermite.ListRefsRequest2255+ 4, // 16: ermite.Line.kind:type_name -> ermite.LineKind
2172- 8, // 17: ermite.GitService.GetTree:input_type -> ermite.GetTreeRequest2256+ 6, // 17: ermite.GitService.ListRefs:input_type -> ermite.ListRefsRequest
2173- 10, // 18: ermite.GitService.ListPaths:input_type -> ermite.ListPathsRequest2257+ 9, // 18: ermite.GitService.GetTree:input_type -> ermite.GetTreeRequest
2174- 13, // 19: ermite.GitService.GetBlob:input_type -> ermite.GetBlobRequest2258+ 11, // 19: ermite.GitService.ListPaths:input_type -> ermite.ListPathsRequest
2175- 15, // 20: ermite.GitService.ListCommits:input_type -> ermite.ListCommitsRequest2259+ 14, // 20: ermite.GitService.GetBlob:input_type -> ermite.GetBlobRequest
2176- 17, // 21: ermite.GitService.GetCommit:input_type -> ermite.GetCommitRequest2260+ 16, // 21: ermite.GitService.ListCommits:input_type -> ermite.ListCommitsRequest
2177- 24, // 22: ermite.GitService.ResolveRevision:input_type -> ermite.ResolveRevisionRequest2261+ 18, // 22: ermite.GitService.GetCommit:input_type -> ermite.GetCommitRequest
2178- 6, // 23: ermite.GitService.ListRefs:output_type -> ermite.ListRefsResponse2262+ 25, // 23: ermite.GitService.ResolveRevision:input_type -> ermite.ResolveRevisionRequest
2179- 9, // 24: ermite.GitService.GetTree:output_type -> ermite.GetTreeResponse2263+ 7, // 24: ermite.GitService.ListRefs:output_type -> ermite.ListRefsResponse
2180- 11, // 25: ermite.GitService.ListPaths:output_type -> ermite.ListPathsResponse2264+ 10, // 25: ermite.GitService.GetTree:output_type -> ermite.GetTreeResponse
2181- 14, // 26: ermite.GitService.GetBlob:output_type -> ermite.GetBlobResponse2265+ 12, // 26: ermite.GitService.ListPaths:output_type -> ermite.ListPathsResponse
2182- 16, // 27: ermite.GitService.ListCommits:output_type -> ermite.ListCommitsResponse2266+ 15, // 27: ermite.GitService.GetBlob:output_type -> ermite.GetBlobResponse
2183- 18, // 28: ermite.GitService.GetCommit:output_type -> ermite.GetCommitResponse2267+ 17, // 28: ermite.GitService.ListCommits:output_type -> ermite.ListCommitsResponse
2184- 25, // 29: ermite.GitService.ResolveRevision:output_type -> ermite.ResolveRevisionResponse2268+ 19, // 29: ermite.GitService.GetCommit:output_type -> ermite.GetCommitResponse
2185- 23, // [23:30] is the sub-list for method output_type2269+ 26, // 30: ermite.GitService.ResolveRevision:output_type -> ermite.ResolveRevisionResponse
2186- 16, // [16:23] is the sub-list for method input_type2270+ 24, // [24:31] is the sub-list for method output_type
2187- 16, // [16:16] is the sub-list for extension type_name2271+ 17, // [17:24] is the sub-list for method input_type
2188- 16, // [16:16] is the sub-list for extension extendee2272+ 17, // [17:17] is the sub-list for extension type_name
2189- 0, // [0:16] is the sub-list for field type_name2273+ 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 {
5353 FILE_STATUS_TYPE_CHANGED = 6;
5454 }
5555
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+
5674 // LineKind tells how a line of a hunk relates to the two sides of a diff.
5775 enum LineKind {
5876 // Not set. Never returned.
@@ -335,8 +353,8 @@ message Diff {
335353 // Files are the changed files, ordered by path. Files past the file limit are
336354 // omitted.
337355 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.
340358 bool truncated = 2;
341359 }
342360
@@ -367,11 +385,15 @@ message FileDiff {
367385 // copied file, and 0 otherwise.
368386 int32 similarity = 11;
369387 // 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.
371390 bool truncated = 12;
372391 // Hunks are the changed regions, in file order. Empty for a binary file, a
373392 // truncated file, a pure rename and a mode-only change.
374393 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;
375397 }
376398
377399 // 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 are353 // 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 at356+ // 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 empty387 // 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, a391 // 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.

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 18

↑↓ moveenter openesc close