blob: 25eb0965e910f06f2eafaa6e65bffe4d3c8c330c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
syntax = "proto3";
package gitaly;
import "google/protobuf/timestamp.proto";
import "lint.proto";
import "shared.proto";
option go_package = "gitlab.com/gitlab-org/gitaly/v14/proto/go/gitalypb";
// ConflictsService is a service which provides RPCs to interact with conflicts
// resulting from a merge.
service ConflictsService {
rpc ListConflictFiles(ListConflictFilesRequest) returns (stream ListConflictFilesResponse) {
option (op_type) = {
op: ACCESSOR
};
}
// ResolveConflicts tries to resolve a conflicting merge with a set of
// user-provided merge resolutions. If resolving the conflict succeeds, the
// result will be a new merge commit.
rpc ResolveConflicts(stream ResolveConflictsRequest) returns (ResolveConflictsResponse) {
option (op_type) = {
op: MUTATOR
};
}
}
message ListConflictFilesRequest {
Repository repository = 1 [(target_repository)=true];
string our_commit_oid = 2;
string their_commit_oid = 3;
// AllowTreeConflicts will not cause the request to fail in case there are
// tree conflicts. If set to true, then responses may contain conflict files
// where some of the paths are unset.
bool allow_tree_conflicts = 4;
}
message ConflictFileHeader {
reserved 1;
string commit_oid = 2;
bytes their_path = 3;
bytes our_path = 4;
int32 our_mode = 5;
bytes ancestor_path = 6;
}
message ConflictFile {
oneof conflict_file_payload {
ConflictFileHeader header = 1;
bytes content = 2;
}
}
message ListConflictFilesResponse {
repeated ConflictFile files = 1;
}
// ResolveConflictsRequestHeader is the first message that must be sent for
// each ResolveConflicts call.
message ResolveConflictsRequestHeader {
// Repository is the repository in which conflicts shall be resolved and
// where SourceBranch shall be updated with the resolved conflict.
Repository repository = 1 [(gitaly.target_repository)=true];
// OurCommitOid is the OID of the commit representing the local commit.
string our_commit_oid = 2;
// TargetRepository is the repository from which TheirCommitOid shall be
// retrieved.
Repository target_repository = 3;
// TheirCommitOid is the OID of the commit representing the remote commit
// which is to be merged into the local commit.
string their_commit_oid = 4;
// SourceBranch is the branch on which the new commit shall be created.
bytes source_branch = 5;
// TargetBranch identifies the branch which will be fetched from
// TargetRepository in case TheirCommitOid does not exist in Repository.
bytes target_branch = 6;
// CommitMessage is the message of the newly created merge commit.
bytes commit_message = 7;
// User is the user used as author and committer of the newly created merge
// commit.
User user = 8;
// timestamp is the optional timestamp to use for the commit as committer
// date. If it's not set, the current time will be used.
google.protobuf.Timestamp timestamp = 9;
}
// ResolveConflictsRequest is a request for the ResolveConflicts RPC.
message ResolveConflictsRequest {
// RequestPayload is the payload part of the request. The first message sent
// must always be a ResolveConflictsRequestHeader, whereas all remaining
// requests must be FilesJson requests.
oneof resolve_conflicts_request_payload {
// Header is the initial message specifying parameters of the RPC call.
ResolveConflictsRequestHeader header = 1;
// FilesJson is a JSON-encoded list of conflicts resolutions.
bytes files_json = 2;
}
}
// ResolveConflictsResponse is a response of the ResolveConflicts RPC. Conflict
// resolution may have failed even if the RPC has returned OK. The user must
// check ResolutionError to verify whether the merge commit was correctly
// computed or not.
message ResolveConflictsResponse {
// ResolutionError contains a description of why conflict resolution has
// failed.
string resolution_error = 1;
}
|