scm: git: call entries_git() in adapter entriese() for browsing tree performance (#7047).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5641 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-05-04 18:08:30 +00:00
parent 18df827244
commit 193af67f99

View File

@ -121,7 +121,8 @@ module Redmine
end end
def entries(path=nil, identifier=nil, options={}) def entries(path=nil, identifier=nil, options={})
entries_git(path, identifier, options) entries_git(path, identifier,
{:report_last_commit => @flag_report_last_commit})
end end
def entries_git(path=nil, identifier=nil, options={}) def entries_git(path=nil, identifier=nil, options={})
@ -149,7 +150,8 @@ module Redmine
:path => full_p, :path => full_p,
:kind => (type == "tree") ? 'dir' : 'file', :kind => (type == "tree") ? 'dir' : 'file',
:size => (type == "tree") ? nil : size, :size => (type == "tree") ? nil : size,
:lastrev => @flag_report_last_commit ? lastrev(full_path, identifier) : Revision.new :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}
end end
end end