From 6dc57e752dc436199afbcc9554d5ec8ebd369703 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 10 Mar 2011 04:30:47 +0000 Subject: [PATCH] scm: git: insert revisions to database with reverse commit order (#7821, #5357). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5073 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/repository/git.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/repository/git.rb b/app/models/repository/git.rb index fb5c26a7e..ebb0dd7e6 100644 --- a/app/models/repository/git.rb +++ b/app/models/repository/git.rb @@ -77,7 +77,7 @@ class Repository::Git < Repository c = changesets.find(:first, :order => 'committed_on DESC') since = (c ? c.committed_on - 7.days : nil) - revisions = scm.revisions('', nil, nil, :all => true, :since => since) + revisions = scm.revisions('', nil, nil, {:all => true, :since => since, :reverse => true}) return if revisions.nil? || revisions.empty? recent_changesets = changesets.find(:all, :conditions => ['committed_on >= ?', since]) -- 2.39.5