Skip to content

Conversation: RefService::FindAllBranches

Gitlab::Git::Repository#branches

Feature Flag: gitaly_branches


Stages:

RPC Endpoints:

  • Endpoint::Name

Known Client Routes:

  • Known client endpoint
service RefService {
  rpc FindAllBranches(FindAllBranchesRequest) returns (stream FindAllBranchesResponse) {}
}

message FindAllBranchesRequest {
  Repository repository = 1;
}

message FindAllBranchesResponse {
  message Branch {
    bytes name = 1;
    string target_id = 2;
    GitCommit target_commit = 3;
  }
  repeated Branch branches = 1;
}

I think this will be very similar to our RefService.FindLocalBranches RPC.

Note investigate how the existing code handles refs that point to commits that don't exist, and make sure we do the same. Also don't blindly return cmd.Wait() errors.

Edited by Alejandro Rodríguez
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information