diff options
author | Jose Ivan Vargas Lopez <jvargas@gitlab.com> | 2017-06-07 23:31:06 +0000 |
---|---|---|
committer | Jose Ivan Vargas Lopez <jvargas@gitlab.com> | 2017-06-07 23:31:06 +0000 |
commit | fb80347dc00657ba36576f1f23bd42fdbcf9520a (patch) | |
tree | 2642ac39cda31e29ea80defdc71e00c89ac8979e /app/models/commit.rb | |
parent | 73924cc51495f5f497114ed9f9de02f8b9c4205b (diff) | |
parent | 6eb96b2019d392d906a64108dbe83b3ce7cce758 (diff) | |
download | gitlab-ce-additional-metrics-dashboard.tar.gz |
Merge branch '28717-additional-metrics-review-branch' into 'additional-metrics-dashboard'additional-metrics-dashboard
# Conflicts:
# app/assets/stylesheets/pages/environments.scss
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index dbc0a22829e..bfa3a624e70 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -14,7 +14,7 @@ class Commit participant :committer participant :notes_with_associations - attr_accessor :project + attr_accessor :project, :author DIFF_SAFE_LINES = Gitlab::Git::DiffCollection::DEFAULT_LIMITS[:max_lines] @@ -177,7 +177,7 @@ class Commit if RequestStore.active? key = "commit_author:#{author_email.downcase}" # nil is a valid value since no author may exist in the system - if RequestStore.store.has_key?(key) + if RequestStore.store.key?(key) @author = RequestStore.store[key] else @author = find_author_by_any_email @@ -326,11 +326,12 @@ class Commit end def raw_diffs(*args) - if Gitlab::GitalyClient.feature_enabled?(:commit_raw_diffs) - Gitlab::GitalyClient::Commit.new(project.repository).diff_from_parent(self, *args) - else - raw.diffs(*args) - end + # Uncomment when https://gitlab.com/gitlab-org/gitaly/merge_requests/170 is merged + # if Gitlab::GitalyClient.feature_enabled?(:commit_raw_diffs) + # Gitlab::GitalyClient::Commit.new(project.repository).diff_from_parent(self, *args) + # else + raw.diffs(*args) + # end end def raw_deltas |