Skip to content

Commit::Between RPC Design

Conversation: #315 (closed)

Based on the uses of Gitlab::Git::Commit.between and Gitlab::Git::Repository.commits_between in Gitlab CE and Gitlab EE, we need commits on the response to have:

  • id (sha)
  • subject (used to display it on the Web interface and for Commit#work_in_progress?)

Additionally, app/services/git_push_service.rb will ask for the raw_deltas of the commit. This is already migrated on Commit#raw_deltas.

Expected Artefacts

grpc-proto RPC prototypes:

service Commit {
  rpc Between(CommitsBetweenRequest) returns (CommitsBetweenResponse) {}
}

message CommitsBetweenRequest {
  Repository repository = 1
  int count = 2
  repeated bytes paths = 3
}

message CommitsBetweenResponse {
  repeated Commit commits = 1
}

message Commit {
  string id = 1
  bytes subject = 2
}

/cc @andrewn @jacobvosmaer-gitlab

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