summaryrefslogtreecommitdiffstats
path: root/lib/redmine/scm/adapters
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-05-04 18:08:30 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-05-04 18:08:30 +0000
commit193af67f99417454f710db8461fec08d71fcf689 (patch)
treea0926786dbfefca6cd321a0c1ab1b552c325f4e4 /lib/redmine/scm/adapters
parent18df827244b61da53a56d51e75f38aaed170b213 (diff)
downloadredmine-193af67f99417454f710db8461fec08d71fcf689.tar.gz
redmine-193af67f99417454f710db8461fec08d71fcf689.zip
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
Diffstat (limited to 'lib/redmine/scm/adapters')
-rw-r--r--lib/redmine/scm/adapters/git_adapter.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb
index 68fbfd653..01d0a6044 100644
--- a/lib/redmine/scm/adapters/git_adapter.rb
+++ b/lib/redmine/scm/adapters/git_adapter.rb
@@ -121,7 +121,8 @@ module Redmine
end
def entries(path=nil, identifier=nil, options={})
- entries_git(path, identifier, options)
+ entries_git(path, identifier,
+ {:report_last_commit => @flag_report_last_commit})
end
def entries_git(path=nil, identifier=nil, options={})
@@ -149,7 +150,8 @@ module Redmine
:path => full_p,
:kind => (type == "tree") ? 'dir' : 'file',
: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}
end
end