diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-07-17 13:17:43 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-07-18 15:46:27 +0300 |
commit | 9348efc6bae3f5eee948fc6871fa4bf5afbbfd4e (patch) | |
tree | 53ecaa1ad4beaa9c823ca9781097c6fbecf4fb4a /app/models/repository.rb | |
parent | 740ae2d194f3833e224c326cc909d833c5807484 (diff) |
Client implementation for Repository#new_commits
After trying to remove the whole method in
8f69014af2902d8d53fe931268bec60f6858f160, this is a more gentle
approach to the method. :)
Prior to this change, new commit detection wasn't implemented in Gitaly,
this was done through: https://gitlab.com/gitlab-org/gitaly/merge_requests/779
As the new implemented got moved around a bit, the whole RevList class
got removed.
Part of https://gitlab.com/gitlab-org/gitaly/issues/1233
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index a96c73e6ab7..e248f94cbd8 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -154,12 +154,9 @@ class Repository # Returns a list of commits that are not present in any reference def new_commits(newrev) - # Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/1233 - refs = Gitlab::GitalyClient::StorageSettings.allow_disk_access do - ::Gitlab::Git::RevList.new(raw, newrev: newrev).new_refs - end + commits = raw.new_commits(newrev) - refs.map { |sha| commit(sha.strip) } + ::Commit.decorate(commits, project) end # Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/384 |