DiffService.CommitDiff: implement collect_all_paths
In Gitaly 16.1, this new option appears:
$ git diff f93ae4ee858d81f450fd0a1d262fed7a64e385a0..eefa5b7efbc45ea1d3569beaa23ea960f741fa54 -- proto/*.proto internal/backup
diff --git a/proto/diff.proto b/proto/diff.proto
index e26579255..85ad1a3d9 100644
--- a/proto/diff.proto
+++ b/proto/diff.proto
@@ -132,6 +132,12 @@ message CommitDiffRequest {
// WhitespaceChanges states which whitespace changes should be included in the diff.
// Please refer to the enum declaration for supported modes.
WhitespaceChanges whitespace_changes = 17;
+
+ // CollectAllPaths can be set when you want to get back all files,
+ // even when the enforced limits are hit. Responses sent when the limits
+ // were hit will have the path filled in, have the `overflow_marker` set,
+ // but have no patch data.
+ bool collect_all_paths = 18;
}
// A CommitDiffResponse corresponds to a single changed file in a commit.
@@ -156,8 +162,8 @@ message CommitDiffResponse {
bytes raw_patch_data = 9;
// This comment is left unintentionally blank.
bool end_of_patch = 10;
- // Indicates the diff file at which we overflow according to the limitations sent,
- // in which case only this attribute will be set.
+ // OverflowMarker Indicates if the diff file exceeded limitations, in which case
+ // there will be no patch data sent, only information about the patch.
bool overflow_marker = 11;
// Indicates the patch surpassed a "safe" limit and was therefore pruned, but
// the client may still request the full patch on a separate request.
It does seem to enter service with GitLab 16.4.