diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-10-10 17:39:29 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-10-10 17:39:29 +0300 |
commit | 8c01448cf9ffb3662ebd22e02077e48ba59c65ca (patch) | |
tree | 93560935c1779b7139787d91010ff3bd07d42a97 /app | |
parent | 0852d5e480e2789dcc6b5cce08fc0875f97af4bf (diff) | |
download | gitlab-ce-8c01448cf9ffb3662ebd22e02077e48ba59c65ca.tar.gz |
Dontr decoarate already decorated stuff
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/models/commit.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index cbe0a39bc70..212229649fc 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -19,7 +19,13 @@ class Commit class << self def decorate(commits) - commits.map { |c| self.new(c) } + commits.map do |commit| + if commit.kind_of?(Commit) + commit + else + self.new(commit) + end + end end # Calculate number of lines to render for diffs |