From 114e3f3b826c13f46c2c87df30d8aa957d9426da Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 5 May 2011 11:43:29 +0000 Subject: scm: git: use the model value of whether reporting last commit in repository tree (#7047). And remove entries_git() and the flag in adapter. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5657 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/git_adapter.rb | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb index 543246a94..f064a5e10 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -22,8 +22,6 @@ module Redmine module Adapters class GitAdapter < AbstractAdapter - SCM_GIT_REPORT_LAST_COMMIT = true - # Git executable name GIT_BIN = Redmine::Configuration['scm_git_command'] || "git" @@ -65,7 +63,6 @@ module Redmine def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil) super @path_encoding = path_encoding.blank? ? 'UTF-8' : path_encoding - @flag_report_last_commit = SCM_GIT_REPORT_LAST_COMMIT end def info @@ -115,17 +112,13 @@ module Redmine Entry.new(:path => '', :kind => 'dir') else # Search for the entry in the parent directory - es = entries_git(search_path, identifier) + es = entries(search_path, identifier, + options = {:report_last_commit => false}) es ? es.detect {|e| e.name == search_name} : nil end end def entries(path=nil, identifier=nil, options={}) - entries_git(path, identifier, - {:report_last_commit => @flag_report_last_commit}) - end - - def entries_git(path=nil, identifier=nil, options={}) path ||= '' p = scm_iconv(@path_encoding, 'UTF-8', path) entries = Entries.new @@ -160,7 +153,6 @@ module Redmine rescue ScmCommandAborted nil end - private :entries_git def lastrev(path, rev) return nil if path.nil? -- cgit v1.2.3