module Scm
module Adapters
class GitAdapter < AbstractAdapter
+
+ SCM_GIT_REPORT_LAST_COMMIT = true
+
# Git executable name
GIT_BIN = Redmine::Configuration['scm_git_command'] || "git"
end
end
+ def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil)
+ super
+ @flag_report_last_commit = SCM_GIT_REPORT_LAST_COMMIT
+ end
+
def info
begin
Info.new(:root_url => url, :lastrev => lastrev('',nil))
:path => full_path,
:kind => (type == "tree") ? 'dir' : 'file',
:size => (type == "tree") ? nil : size,
- :lastrev => lastrev(full_path,identifier)
+ :lastrev => @flag_report_last_commit ? lastrev(full_path,identifier) : Revision.new
}) unless entries.detect{|entry| entry.name == name}
end
end