From 34aa758c1d71c0110778ca5bb9016e4cfde11247 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 22 Nov 2019 14:55:26 +0000 Subject: [PATCH] cleanup: rubocop: fix Layout/EmptyLineAfterGuardClause in app/models/repository/git.rb git-svn-id: http://svn.redmine.org/redmine/trunk@19174 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/repository/git.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/repository/git.rb b/app/models/repository/git.rb index 839a26676..97ae64e88 100644 --- a/app/models/repository/git.rb +++ b/app/models/repository/git.rb @@ -43,8 +43,10 @@ class Repository::Git < Repository def report_last_commit return false if extra_info.nil? + v = extra_info["extra_report_last_commit"] return false if v.nil? + v.to_s != '0' end @@ -244,11 +246,13 @@ class Repository::Git < Repository def latest_changesets(path,rev,limit=10) revisions = scm.revisions(path, nil, rev, :limit => limit, :all => false) return [] if revisions.nil? || revisions.empty? + changesets.where(:scmid => revisions.map {|c| c.scmid}).to_a end def clear_extra_info_of_changesets return if extra_info.nil? + v = extra_info["extra_report_last_commit"] write_attribute(:extra_info, nil) h = {} -- 2.39.5