From 02f17b6d2b7255b9acc83ac5c61791ead5934fd7 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sun, 25 Sep 2022 04:56:16 +0000 Subject: [PATCH] Fix RuboCop offense Rails/Blank (#37614). git-svn-id: https://svn.redmine.org/redmine/trunk@21840 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/repository/git.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/repository/git.rb b/app/models/repository/git.rb index c8bc41b63..d52873745 100644 --- a/app/models/repository/git.rb +++ b/app/models/repository/git.rb @@ -133,7 +133,7 @@ class Repository::Git < Repository # before fetching changesets (eg. for offline resync) def fetch_changesets scm_brs = branches - return if scm_brs.nil? || scm_brs.empty? + return if scm_brs.blank? h1 = extra_info || {} h = h1.dup @@ -246,7 +246,7 @@ 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? + return [] if revisions.blank? changesets.where(:scmid => revisions.map {|c| c.scmid}).to_a end -- 2.39.5