summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-10 17:39:29 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-10 17:39:29 +0300
commit8c01448cf9ffb3662ebd22e02077e48ba59c65ca (patch)
tree93560935c1779b7139787d91010ff3bd07d42a97 /app
parent0852d5e480e2789dcc6b5cce08fc0875f97af4bf (diff)
downloadgitlab-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.rb8
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