Conversation: Extend CommitService::CountCommits with extra options
Extends Conversation: #330
-
RPC Design: https://gitlab.com/gitlab-org/gitaly/issues/413 gitaly-proto!47 (merged) -
Server Implementation: https://gitlab.com/gitlab-org/gitaly/issues/414 https://gitlab.com/gitlab-org/gitaly/merge_requests/252 -
Client Implementation: https://gitlab.com/gitlab-org/gitaly/issues/415 https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13121 -
Acceptance Testing: https://gitlab.com/gitlab-org/gitaly/issues/517
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.§