From: Toshi MARUYAMA Date: Fri, 22 Nov 2019 14:55:26 +0000 (+0000) Subject: cleanup: rubocop: fix Layout/EmptyLineAfterGuardClause in app/models/repository/git.rb X-Git-Tag: 4.2.0~1466 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=34aa758c1d71c0110778ca5bb9016e4cfde11247;p=redmine.git 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 --- 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 = {}