Skip to content

Conversation: Extend CommitService::CountCommits with extra options

Extends ~Conversation: #330 (closed)

Gitlab::Git::Repository#count_commits

We can migrate Gitlab::Git::Repository#count_commits if we add three options to CommitService.CountCommits

message CountCommitsRequest {
  Repository repository = 1;
  bytes revision = 2;
  // Optional
  google.protobuf.Timestamp after = 2;
  // Optional
  google.protobuf.Timestamp before = 3;
  // Optional
  bytes path = 5;
}

These options translate into git rev-list options. While we're at it, we can change the Go implementation so that it uses git rev-list --count and we don't have to scan lines.§

Edited by Andrew Newdigate
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information