diff options
author | Mateusz Nowotyński <maxmati4@gmail.com> | 2019-11-29 02:24:46 +0300 |
---|---|---|
committer | jramsay <maxmati4@gmail.com> | 2020-02-06 22:29:01 +0300 |
commit | eef10e2217463c7c3582604ebdebae36679e43f4 (patch) | |
tree | 8781b89a8c0320449d17871fc0112364171e25f7 /proto/smarthttp.proto | |
parent | fc5321467ae7f2a9d39e81f3f700495292fd785e (diff) |
Use field annotation for target and additional repository
Instead of setting OID in the RPC method use annotation in the field
(`target_repository` and `additional_repository`). Having only this 2
annotations created a problem with messages that can be either target
or additional repository (for example `ObjectPool`). Those are marked
with `repository` annotation and `target_repository` and
`additional_repository` are used in the parent messages.
Signed-off-by: Mateusz Nowotyński <maxmati4@gmail.com>
Signed-off-by: jramsay <maxmati4@gmail.com>
Diffstat (limited to 'proto/smarthttp.proto')
-rw-r--r-- | proto/smarthttp.proto | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/proto/smarthttp.proto b/proto/smarthttp.proto index 7b1537c97..d80346546 100644 --- a/proto/smarthttp.proto +++ b/proto/smarthttp.proto @@ -13,7 +13,6 @@ service SmartHTTPService { rpc InfoRefsUploadPack(InfoRefsRequest) returns (stream InfoRefsResponse) { option (op_type) = { op: ACCESSOR - target_repository_field: "1" }; } @@ -23,7 +22,6 @@ service SmartHTTPService { rpc InfoRefsReceivePack(InfoRefsRequest) returns (stream InfoRefsResponse) { option (op_type) = { op: MUTATOR - target_repository_field: "1" }; } @@ -31,7 +29,6 @@ service SmartHTTPService { rpc PostUploadPack(stream PostUploadPackRequest) returns (stream PostUploadPackResponse) { option (op_type) = { op: ACCESSOR - target_repository_field: "1" }; } @@ -39,13 +36,12 @@ service SmartHTTPService { rpc PostReceivePack(stream PostReceivePackRequest) returns (stream PostReceivePackResponse) { option (op_type) = { op: MUTATOR - target_repository_field: "1" }; } } message InfoRefsRequest { - Repository repository = 1; + Repository repository = 1 [(target_repository)=true]; // Parameters to use with git -c (key=value pairs) repeated string git_config_options = 2; @@ -59,7 +55,7 @@ message InfoRefsResponse { message PostUploadPackRequest { // repository should only be present in the first message of the stream - Repository repository = 1; + Repository repository = 1 [(target_repository)=true]; // Raw data to be copied to stdin of 'git upload-pack' bytes data = 2; // Parameters to use with git -c (key=value pairs) @@ -76,7 +72,7 @@ message PostUploadPackResponse { message PostReceivePackRequest { // repository should only be present in the first message of the stream - Repository repository = 1; + Repository repository = 1 [(target_repository)=true]; // Raw data to be copied to stdin of 'git receive-pack' bytes data = 2; // gl_id, gl_repository, and gl_username become env variables, used by the Git {pre,post}-receive |