blob: 681b0b075959b9e6d23ae36e50f0f7399cd8085a (
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
|
syntax = "proto3";
package gitaly;
option go_package = "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb";
import "shared.proto";
service OperationService {
rpc UserCreateBranch(UserCreateBranchRequest) returns (UserCreateBranchResponse) {
option (op_type) = {
op: MUTATOR
target_repository_field: "1"
};
}
rpc UserUpdateBranch(UserUpdateBranchRequest) returns (UserUpdateBranchResponse) {
option (op_type) = {
op: MUTATOR
target_repository_field: "1"
};
}
rpc UserDeleteBranch(UserDeleteBranchRequest) returns (UserDeleteBranchResponse) {
option (op_type) = {
op: MUTATOR
target_repository_field: "1"
};
}
rpc UserCreateTag(UserCreateTagRequest) returns (UserCreateTagResponse) {
option (op_type) = {
op: MUTATOR
target_repository_field: "1"
};
}
rpc UserDeleteTag(UserDeleteTagRequest) returns (UserDeleteTagResponse) {
option (op_type) = {
op: MUTATOR
target_repository_field: "1"
};
}
rpc UserMergeToRef(UserMergeToRefRequest) returns (UserMergeToRefResponse) {
option (op_type) = {
op: MUTATOR
target_repository_field: "1"
};
}
rpc UserMergeBranch(stream UserMergeBranchRequest) returns (stream UserMergeBranchResponse) {
option (op_type) = {
op: MUTATOR
target_repository_field: "1"
};
}
rpc UserFFBranch(UserFFBranchRequest) returns (UserFFBranchResponse) {
option (op_type) = {
op: MUTATOR
target_repository_field: "1"
};
}
rpc UserCherryPick(UserCherryPickRequest) returns (UserCherryPickResponse) {
option (op_type) = {
op: MUTATOR
target_repository_field: "1"
};
}
rpc UserCommitFiles(stream UserCommitFilesRequest) returns (UserCommitFilesResponse) {
option (op_type) = {
op: MUTATOR
target_repository_field: "1.1"
};
}
rpc UserRebase(UserRebaseRequest) returns (UserRebaseResponse) {
option deprecated = true;
option (op_type) = {
op: MUTATOR
target_repository_field: "1"
};
}
rpc UserRebaseConfirmable(stream UserRebaseConfirmableRequest) returns (stream UserRebaseConfirmableResponse) {
option (op_type) = {
op: MUTATOR
target_repository_field: "1.1"
};
}
rpc UserRevert(UserRevertRequest) returns (UserRevertResponse) {
option (op_type) = {
op: MUTATOR
target_repository_field: "1"
};
}
rpc UserSquash(UserSquashRequest) returns (UserSquashResponse) {
option (op_type) = {
op: MUTATOR
target_repository_field: "1"
};
}
rpc UserApplyPatch(stream UserApplyPatchRequest) returns (UserApplyPatchResponse) {
option (op_type) = {
op: MUTATOR
target_repository_field: "1.1"
};
}
rpc UserUpdateSubmodule(UserUpdateSubmoduleRequest) returns (UserUpdateSubmoduleResponse) {
option (op_type) = {
op: MUTATOR
target_repository_field: "1"
};
}
}
message UserCreateBranchRequest {
Repository repository = 1;
bytes branch_name = 2;
User user = 3;
bytes start_point = 4;
}
message UserCreateBranchResponse {
Branch branch = 1;
// Error returned by the pre-receive hook. If no error was thrown,
// it's the empty string ("")
string pre_receive_error = 2;
}
message UserUpdateBranchRequest {
Repository repository = 1;
bytes branch_name = 2;
User user = 3;
bytes newrev = 4;
bytes oldrev = 5;
}
message UserUpdateBranchResponse {
string pre_receive_error = 1;
}
message UserDeleteBranchRequest {
Repository repository = 1;
bytes branch_name = 2;
User user = 3;
}
message UserDeleteBranchResponse {
string pre_receive_error = 1;
}
message UserDeleteTagRequest {
Repository repository = 1;
bytes tag_name = 2;
User user = 3;
}
message UserDeleteTagResponse {
string pre_receive_error = 1;
}
message UserCreateTagRequest {
Repository repository = 1;
bytes tag_name = 2;
User user = 3;
bytes target_revision = 4;
bytes message = 5;
}
message UserCreateTagResponse {
Tag tag = 1;
bool exists = 2;
string pre_receive_error = 3;
}
message UserMergeBranchRequest {
// First message
Repository repository = 1;
User user = 2;
string commit_id = 3;
bytes branch = 4;
bytes message = 5;
// Second message
// Tell the server to apply the merge to the branch
bool apply = 6;
}
message UserMergeBranchResponse {
// First message
// The merge commit the branch will be updated to. The caller can still abort the merge.
string commit_id = 1;
reserved 2;
// Second message
// If set, the merge has been applied to the branch.
OperationBranchUpdate branch_update = 3;
string pre_receive_error = 4;
}
message UserMergeToRefRequest {
// UserMergeRef creates a merge commit and updates target_ref to point to that
// new commit. The first parent of the merge commit (the main line) is taken
// from first_parent_ref. The second parent is specified by its commit ID in source_sha.
// If target_ref already exists it will be overwritten.
Repository repository = 1;
User user = 2;
string source_sha = 3;
// branch is deprecated in favor of `first_parent_ref`.
bytes branch = 4;
bytes target_ref = 5;
bytes message = 6;
bytes first_parent_ref = 7;
}
message UserMergeToRefResponse {
string commit_id = 1;
string pre_receive_error = 2;
}
message OperationBranchUpdate {
// If this string is non-empty the branch has been updated.
string commit_id = 1;
// Used for cache invalidation in GitLab
bool repo_created = 2;
// Used for cache invalidation in GitLab
bool branch_created = 3;
}
message UserFFBranchRequest {
Repository repository = 1;
User user = 2;
string commit_id = 3;
bytes branch = 4;
}
message UserFFBranchResponse {
OperationBranchUpdate branch_update = 1;
string pre_receive_error = 2;
}
message UserCherryPickRequest {
Repository repository = 1;
User user = 2;
GitCommit commit = 3;
bytes branch_name = 4;
bytes message = 5;
bytes start_branch_name = 6;
Repository start_repository = 7;
}
message UserCherryPickResponse {
OperationBranchUpdate branch_update = 1;
string create_tree_error = 2;
string commit_error = 3;
string pre_receive_error = 4;
}
message UserRevertRequest {
Repository repository = 1;
User user = 2;
GitCommit commit = 3;
bytes branch_name = 4;
bytes message = 5;
bytes start_branch_name = 6;
Repository start_repository = 7;
}
message UserRevertResponse {
OperationBranchUpdate branch_update = 1;
string create_tree_error = 2;
string commit_error = 3;
string pre_receive_error = 4;
}
message UserCommitFilesActionHeader {
enum ActionType {
CREATE = 0;
CREATE_DIR = 1;
UPDATE = 2;
MOVE = 3;
DELETE = 4;
CHMOD = 5;
}
ActionType action = 1;
bytes file_path = 2;
bytes previous_path = 3;
bool base64_content = 4;
bool execute_filemode = 5;
// Move actions that change the file path, but not its content, should set
// infer_content to true instead of populating the content field. Ignored for
// other action types.
bool infer_content = 6;
}
message UserCommitFilesAction {
oneof user_commit_files_action_payload {
UserCommitFilesActionHeader header = 1;
bytes content = 2;
}
}
message UserCommitFilesRequestHeader {
Repository repository = 1;
User user = 2;
bytes branch_name = 3;
bytes commit_message = 4;
bytes commit_author_name = 5;
bytes commit_author_email = 6;
bytes start_branch_name = 7;
Repository start_repository = 8;
bool force = 9;
string start_sha = 10;
}
message UserCommitFilesRequest {
oneof user_commit_files_request_payload {
// For each request stream there should be first a request with a header and
// then n requests with actions
UserCommitFilesRequestHeader header = 1;
UserCommitFilesAction action = 2;
}
}
message UserCommitFilesResponse {
OperationBranchUpdate branch_update = 1;
string index_error = 2;
string pre_receive_error = 3;
}
// DEPRECATED: https://gitlab.com/gitlab-org/gitaly/issues/1628
message UserRebaseRequest {
option deprecated = true;
Repository repository = 1;
User user = 2;
string rebase_id = 3;
bytes branch = 4;
string branch_sha = 5;
Repository remote_repository = 6;
bytes remote_branch = 7;
}
// DEPRECATED: https://gitlab.com/gitlab-org/gitaly/issues/1628
message UserRebaseResponse {
option deprecated = true;
string rebase_sha = 1;
string pre_receive_error = 2;
string git_error = 3;
}
message UserRebaseConfirmableRequest {
message Header {
Repository repository = 1;
User user = 2;
string rebase_id = 3;
bytes branch = 4;
string branch_sha = 5;
Repository remote_repository = 6;
bytes remote_branch = 7;
}
oneof user_rebase_confirmable_request_payload {
// For each request stream there must be first a request with a header
// containing details about the rebase to perform.
Header header = 1;
// A second request must be made to confirm that the rebase should
// be applied to the branch.
bool apply = 2;
}
}
message UserRebaseConfirmableResponse {
oneof user_rebase_confirmable_response_payload {
// The first response will contain the rebase commit the branch will
// be updated to. The caller can still abort the rebase.
string rebase_sha = 1;
// The second response confirms that the rebase has been applied to
// the branch.
bool rebase_applied = 2;
}
string pre_receive_error = 3;
string git_error = 4;
}
message UserSquashRequest {
Repository repository = 1;
User user = 2;
string squash_id = 3;
bytes branch = 4;
string start_sha = 5;
string end_sha = 6;
User author = 7;
bytes commit_message = 8;
}
message UserSquashResponse {
string squash_sha = 1;
// DEPRECATED: https://gitlab.com/gitlab-org/gitaly/proto/merge_requests/161
reserved 2;
reserved "pre_receive_error";
string git_error = 3;
}
message UserApplyPatchRequest {
message Header {
Repository repository = 1;
User user = 2;
bytes target_branch = 3;
}
oneof user_apply_patch_request_payload {
Header header = 1;
bytes patches = 2;
}
}
message UserApplyPatchResponse {
OperationBranchUpdate branch_update = 1;
}
message UserUpdateSubmoduleRequest {
Repository repository = 1;
User user = 2;
string commit_sha = 3;
bytes branch = 4;
bytes submodule = 5;
bytes commit_message = 6;
}
message UserUpdateSubmoduleResponse {
OperationBranchUpdate branch_update = 1;
string pre_receive_error = 2;
// DEPRECATED: https://gitlab.com/gitlab-org/gitaly/proto/merge_requests/237
reserved 3;
reserved "create_tree_error";
string commit_error = 4;
}
|