Inspect changes in Gitaly 0f9df77f1f480d5f4087cc9400c13dcbab2e174e
Upstream merge commit e0c836e55e54 changes Gitaly server version from 04a27b70fa9cbb03729617ca671aeaf766de5d85 to 0f9df77f1f480d5f4087cc9400c13dcbab2e174e, with changes in protocol or one of the source subtrees currently under watch.
The topic upstream-merge
is at 120 non-merge commits.
To further inspect, go to an up to date Gitaly source clone and run:
git diff 04a27b70fa9cbb03729617ca671aeaf766de5d85..0f9df77f1f480d5f4087cc9400c13dcbab2e174e -- proto/*.proto internal/backup
Here is a preview, truncated at 500 lines:
diff --git a/proto/diff.proto b/proto/diff.proto
index 57ed3675c..fd0c7583c 100644
--- a/proto/diff.proto
+++ b/proto/diff.proto
@@ -84,6 +84,14 @@ service DiffService {
op: ACCESSOR
};
};
+
+ // DiffBlobs computes diffs between pairs of blobs. A batch of blob pairs is sent to the server.
+ // The resulting patches are then chucked across response messages and streamed to the client.
+ rpc DiffBlobs(DiffBlobsRequest) returns (stream DiffBlobsResponse) {
+ option (op_type) = {
+ op: ACCESSOR
+ };
+ }
}
// CommitDiffRequest is a request for the CommitDiff RPC.
@@ -520,3 +528,72 @@ message RangeDiffResponse {
// end_of_patch check if the patch data is the last one response of this commit pair.
bool end_of_patch = 9;
}
+
+// DiffBlobsRequest is a request for the DiffBlobs RPC.
+message DiffBlobsRequest {
+ // DiffMode determines the type of diff that will be returned.
+ enum DiffMode {
+ // DIFF_MODE_UNSPECIFIED is the standard diff mode and results in a line diff for text files.
+ DIFF_MODE_UNSPECIFIED = 0;
+ // DIFF_MODE_WORD is a word diff and computes the diff for whitespace separated words instead of
+ // for whole lines by using the `--word-diff=porcelain` option.
+ DIFF_MODE_WORD = 1;
+ }
+
+ // WhitespaceChanges states which whitespace changes we should ignore. These options correlate to
+ // the ones present in git-diff(1).
+ enum WhitespaceChanges {
+ // WHITESPACE_CHANGES_UNSPECIFIED is used to not ignore any whitespace changes.
+ WHITESPACE_CHANGES_UNSPECIFIED = 0;
+ // WHITESPACE_CHANGES_IGNORE specifies to use the `--ignore-space-change` flag of git-diff(1).
+ // Only changes in amount of whitespace are ignored.
+ WHITESPACE_CHANGES_IGNORE = 1;
+ // WHITESPACE_CHANGES_IGNORE_ALL specifies to use the `--ignore-all-space` flag of git-diff(1).
+ // all whitespace characters are ignored when comparing lines.
+ WHITESPACE_CHANGES_IGNORE_ALL = 2;
+ }
+
+ // BlobPair defines a pair of blobs a patch is generated for.
+ message BlobPair {
+ // left_oid is the left blob ID in in <left blob>..<right blob>.
+ string left_oid = 1;
+ // right_oid is the right blob ID in in <left blob>..<right blob>.
+ string right_oid = 2;
+ }
+
+ // repository is the repository the blob diff is generated for.
+ Repository repository = 1 [(target_repository)=true];
+ // blob_pairs defines the set of blob pairs to generate diffs for.
+ repeated BlobPair blob_pairs = 2;
+ // diff_mode is the mode used for generating the diff. Refer to the enum declaration above for
+ // supported modes.
+ DiffMode diff_mode = 3;
+ // whitespace_changes states which whitespace changes should be included in the diff. Refer to the
+ // enum declaration above for supported modes.
+ WhitespaceChanges whitespace_changes = 4;
+}
+
+// DiffBlobsResponse is a response for the DiffBlobs RPC.
+message DiffBlobsResponse {
+ // Status defines the state of a patch at a given response message.
+ enum Status {
+ // STATUS_INCOMPLETE indicates the patch has not been completely transmitted. Subsequent
+ // response messages contain the remaining content of the patch.
+ STATUS_INCOMPLETE = 0; // protolint:disable:this ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH
+ // STATUS_END_OF_PATCH indicates the patch was completely parsed and sent. Subsequent response
+ // messages contain the content of the next patch in the diff.
+ STATUS_END_OF_PATCH = 1;
+ }
+
+ // left_blob_id is the left blob ID in in <left blob>..<right blob> of the diffed blob.
+ string left_blob_id = 1;
+ // right_blob_id is the right blob ID in in <left blob>..<right blob> of the diffed blob.
+ string right_blob_id = 2;
+ // patch is the raw generated diff output.
+ bytes patch = 3;
+ // status is the current state of the patch being transmitted.
+ Status status = 4;
+ // binary indicates whether or not the diff compares binary data. If Git considers either blob to
+ // be binary, Git only reports whether the files differ.
+ bool binary = 5;
+}
diff --git a/proto/repository.proto b/proto/repository.proto
index 68e356223..2485c8e40 100644
--- a/proto/repository.proto
+++ b/proto/repository.proto
@@ -362,26 +362,6 @@ service RepositoryService {
};
}
- // SetFullPath writes the "gitlab.fullpath" configuration into the
- // repository's gitconfig. This is mainly to help debugging purposes in case
- // an admin inspects the repository's gitconfig such that he can easily see
- // what the repository name is.
- rpc SetFullPath(SetFullPathRequest) returns (SetFullPathResponse) {
- option deprecated = true;
- option (op_type) = {
- op: MUTATOR
- };
- }
-
- // FullPath reads the "gitlab.fullpath" configuration from the repository's
- // gitconfig. Returns an error in case the full path has not been configured.
- rpc FullPath(FullPathRequest) returns (FullPathResponse) {
- option deprecated = true;
- option (op_type) = {
- op: ACCESSOR
- };
- }
-
// RemoveAll deletes all repositories on a specified storage.
// Deprecated in favour of individually removing repositories with RemoveRepository.
rpc RemoveAll(RemoveAllRequest) returns (RemoveAllResponse) {
@@ -1258,30 +1238,6 @@ message PruneUnreachableObjectsRequest {
message PruneUnreachableObjectsResponse {
}
-// SetFullPathRequest is a request for the SetFullPath RPC.
-message SetFullPathRequest {
- // repository is the repository whose gitconfig should be written to.
- Repository repository = 1 [(target_repository)=true];
- // path is the path that shall be written into the "gitlab.fullpath" config key.
- string path = 2;
-}
-
-// SetFullPathResponse is a response fqor the SetFullPath RPC.
-message SetFullPathResponse {
-}
-
-// FullPathRequest is a request for the FullPath RPC.
-message FullPathRequest {
- // repository is the repository whose gitconfig should be read.
- Repository repository = 1 [(target_repository)=true];
-}
-
-// FullPathResponse is a response for the SetFullPath RPC.
-message FullPathResponse {
- // path read from the "gitlab.fullpath" config key.
- string path = 1;
-}
-
// RemoveAllRequest is a request for the RemoveAll RPC.
message RemoveAllRequest {
// storage_name of the storage to have all repositories removed from.
A merge request may have already been submitted, check that on the merge commit, as usually changes in Gitaly are not breaking, compliance becoming mandatory in the following development cycles.