diff options
author | Robert Speicher <robert@gitlab.com> | 2017-09-01 21:20:20 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-09-01 21:20:20 +0300 |
commit | 5eac0616c7332ce039a1167850ddd17706487807 (patch) | |
tree | 942cabb3b71096de2aad0f89514e3d3f0accbb4f /lib/gitlab/gitaly_client/ref_service.rb | |
parent | d86631bca3f02c63d8a7203981ebc735ab0f993c (diff) | |
parent | 2cbad40f3ecc1d37f6b21541a7960d24eee652ea (diff) |
Merge branch 'gitaly-9-5-2-patch' into '9-5-stable-patch-3'
Refactor Gitlab::Git::Commit to include a repository and add missing specs
See merge request !13815
Diffstat (limited to 'lib/gitlab/gitaly_client/ref_service.rb')
-rw-r--r-- | lib/gitlab/gitaly_client/ref_service.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/gitlab/gitaly_client/ref_service.rb b/lib/gitlab/gitaly_client/ref_service.rb index b0f7548b7dc..919fb68b8c7 100644 --- a/lib/gitlab/gitaly_client/ref_service.rb +++ b/lib/gitlab/gitaly_client/ref_service.rb @@ -16,8 +16,7 @@ module Gitlab response.flat_map do |message| message.branches.map do |branch| - gitaly_commit = GitalyClient::Commit.new(@repository, branch.target) - target_commit = Gitlab::Git::Commit.decorate(gitaly_commit) + target_commit = Gitlab::Git::Commit.decorate(@repository, branch.target) Gitlab::Git::Branch.new(@repository, branch.name, branch.target.id, target_commit) end end @@ -102,8 +101,7 @@ module Gitlab response.flat_map do |message| message.tags.map do |gitaly_tag| if gitaly_tag.target_commit.present? - commit = GitalyClient::Commit.new(@repository, gitaly_tag.target_commit) - gitaly_commit = Gitlab::Git::Commit.new(commit) + gitaly_commit = Gitlab::Git::Commit.decorate(@repository, gitaly_tag.target_commit) end Gitlab::Git::Tag.new( @@ -141,7 +139,7 @@ module Gitlab committer_email: response.commit_committer.email.dup } - Gitlab::Git::Commit.decorate(hash) + Gitlab::Git::Commit.decorate(@repository, hash) end end end |