Dontr decoarate already decorated stuff

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-10-10 17:39:29 +03:00
parent 0852d5e480
commit 8c01448cf9
No known key found for this signature in database
GPG Key ID: 161B5D6A44D3D88A
1 changed files with 7 additions and 1 deletions

View File

@ -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