cleanup: rubocop: fix Style/MultilineIfModifier and Style/MultilineTernaryOperator in lib/redmine/scm/adapters/git_adapter.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@19199 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2019-11-23 14:27:09 +00:00
parent df7188a2e5
commit 68b4701a65
2 changed files with 18 additions and 9 deletions

View File

@@ -149,13 +149,24 @@ module Redmine
full_path = p.empty? ? name : "#{p}/#{name}"
n = scm_iconv('UTF-8', @path_encoding, name)
full_p = scm_iconv('UTF-8', @path_encoding, full_path)
entries << Entry.new({:name => n,
:path => full_p,
:kind => (type == "tree") ? 'dir' : 'file',
:size => (type == "tree") ? nil : size,
:lastrev => options[:report_last_commit] ?
lastrev(full_path, identifier) : Revision.new
}) unless entries.detect{|entry| entry.name == name}
unless entries.detect{|entry| entry.name == name}
entries <<
Entry.
new(
{
:name => n,
:path => full_p,
:kind => (type == "tree") ? 'dir' : 'file',
:size => (type == "tree") ? nil : size,
:lastrev =>
if options[:report_last_commit]
lastrev(full_path, identifier)
else
Revision.new
end
}
)
end
end
end
end