diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-05 11:43:29 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-05 11:43:29 +0000 |
commit | 114e3f3b826c13f46c2c87df30d8aa957d9426da (patch) | |
tree | 4259d7af3398ce0cf86e047480823cf21e8fa871 /lib/redmine/scm/adapters/git_adapter.rb | |
parent | 03fb61a782a3bb8233315facd0a7b47693cd3deb (diff) | |
download | redmine-114e3f3b826c13f46c2c87df30d8aa957d9426da.tar.gz redmine-114e3f3b826c13f46c2c87df30d8aa957d9426da.zip |
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
Diffstat (limited to 'lib/redmine/scm/adapters/git_adapter.rb')
-rw-r--r-- | lib/redmine/scm/adapters/git_adapter.rb | 12 |
1 files changed, 2 insertions, 10 deletions
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? |