@@ -75,7 +75,9 class Repository::Git < Repository | |||
|
75 | 75 | end |
|
76 | 76 | |
|
77 | 77 | def entries(path=nil, identifier=nil) |
|
78 |
scm.entries(path, |
|
|
78 | scm.entries(path, | |
|
79 | identifier, | |
|
80 | options = {:report_last_commit => report_last_commit}) | |
|
79 | 81 | end |
|
80 | 82 | |
|
81 | 83 | # In Git and Mercurial, revisions are not in date order. |
@@ -22,8 +22,6 module Redmine | |||
|
22 | 22 | module Adapters |
|
23 | 23 | class GitAdapter < AbstractAdapter |
|
24 | 24 | |
|
25 | SCM_GIT_REPORT_LAST_COMMIT = true | |
|
26 | ||
|
27 | 25 | # Git executable name |
|
28 | 26 | GIT_BIN = Redmine::Configuration['scm_git_command'] || "git" |
|
29 | 27 | |
@@ -65,7 +63,6 module Redmine | |||
|
65 | 63 | def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil) |
|
66 | 64 | super |
|
67 | 65 | @path_encoding = path_encoding.blank? ? 'UTF-8' : path_encoding |
|
68 | @flag_report_last_commit = SCM_GIT_REPORT_LAST_COMMIT | |
|
69 | 66 | end |
|
70 | 67 | |
|
71 | 68 | def info |
@@ -115,17 +112,13 module Redmine | |||
|
115 | 112 | Entry.new(:path => '', :kind => 'dir') |
|
116 | 113 | else |
|
117 | 114 | # Search for the entry in the parent directory |
|
118 |
es = entries |
|
|
115 | es = entries(search_path, identifier, | |
|
116 | options = {:report_last_commit => false}) | |
|
119 | 117 | es ? es.detect {|e| e.name == search_name} : nil |
|
120 | 118 | end |
|
121 | 119 | end |
|
122 | 120 | |
|
123 | 121 | def entries(path=nil, identifier=nil, options={}) |
|
124 | entries_git(path, identifier, | |
|
125 | {:report_last_commit => @flag_report_last_commit}) | |
|
126 | end | |
|
127 | ||
|
128 | def entries_git(path=nil, identifier=nil, options={}) | |
|
129 | 122 | path ||= '' |
|
130 | 123 | p = scm_iconv(@path_encoding, 'UTF-8', path) |
|
131 | 124 | entries = Entries.new |
@@ -160,7 +153,6 module Redmine | |||
|
160 | 153 | rescue ScmCommandAborted |
|
161 | 154 | nil |
|
162 | 155 | end |
|
163 | private :entries_git | |
|
164 | 156 | |
|
165 | 157 | def lastrev(path, rev) |
|
166 | 158 | return nil if path.nil? |
General Comments 0
You need to be logged in to leave comments.
Login now