mirror of
https://github.com/redmine/redmine.git
synced 2025-10-30 09:56:20 +01:00
Do not parse the entire git log to fetch new commits (takes several minutes for a few thousands commits), but only 1 week before the last known commit (#4547, #4716).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3394 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -110,11 +110,6 @@ module Redmine
|
||||
end
|
||||
end
|
||||
|
||||
def num_revisions
|
||||
cmd = "#{GIT_BIN} --git-dir #{target('')} log --all --pretty=format:'' | wc -l"
|
||||
shellout(cmd) {|io| io.gets.chomp.to_i + 1}
|
||||
end
|
||||
|
||||
def revisions(path, identifier_from, identifier_to, options={})
|
||||
revisions = Revisions.new
|
||||
|
||||
@@ -124,6 +119,7 @@ module Redmine
|
||||
cmd << " -n #{options[:limit]} " if options[:limit]
|
||||
cmd << " #{shell_quote(identifier_from + '..')} " if identifier_from
|
||||
cmd << " #{shell_quote identifier_to} " if identifier_to
|
||||
cmd << " --since=#{shell_quote(options[:since].strftime("%Y-%m-%d %H:%M:%S"))}" if options[:since]
|
||||
cmd << " -- #{path}" if path && !path.empty?
|
||||
|
||||
shellout(cmd) do |io|
|
||||
|
||||
Reference in New Issue
Block a user