From 91eae82348cb742b0508902bc691c5a653fc3620 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 5 Mar 2021 11:53:56 +0100 Subject: proto: Remove name field from Remote messages We've started to ignore the `name` field of remote messages because they're actively harmful. Let's remove it from our proto files. --- proto/repository-service.proto | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'proto/repository-service.proto') diff --git a/proto/repository-service.proto b/proto/repository-service.proto index a3cad35c9..e5ca6bf37 100644 --- a/proto/repository-service.proto +++ b/proto/repository-service.proto @@ -628,10 +628,6 @@ message SearchFilesByContentResponse { message Remote { // url is the URL of the remote repository. string url = 1; - // name is the name of the remote repository. This is mainly used to - // determine where fetched references should end up, e.g. in - // `refs/remotes/$name/`. - string name = 2; // http_authorization_header is the HTTP header which should be added to // the request in order to authenticate against the repository. string http_authorization_header = 3; @@ -647,6 +643,15 @@ message Remote { // // If no refspecs are given, this defaults to "all_refs". repeated string mirror_refmaps = 4; + + // Previously, it was possible to specify a remote name. This was quite a + // dangerous field to set though: the name was simply used to create an ad-hoc + // remote which got deleted afterwards again. So unexpectedly, the remote + // isn't retained. And second, if the user chose the name of an existing + // remote, then it would've been deleted after the call. So in effect, the + // field was at best confusing and useless and at worst actively harmful. + reserved 2; + reserved "name"; } message GetObjectDirectorySizeRequest { -- cgit v1.2.3