summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-02-07 15:17:21 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-02-07 15:17:21 +0000
commit3c20a9b0acd5f43bb9134c711a8fe80fc0497e1c (patch)
treeee463e2062adc03fafd98705b65b35f5fd9ec23f /lib
parentbe2004e3989f30b900b899400a1d468b280f69b8 (diff)
downloadredmine-3c20a9b0acd5f43bb9134c711a8fe80fc0497e1c.tar.gz
redmine-3c20a9b0acd5f43bb9134c711a8fe80fc0497e1c.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/scm/adapters/git_adapter.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb
index 14e1674b1..604407f5b 100644
--- a/lib/redmine/scm/adapters/git_adapter.rb
+++ b/lib/redmine/scm/adapters/git_adapter.rb
@@ -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|