Project

General

Profile

Patch #37614 » 0001-Fix-RuboCop-offense-Rails-Blank.patch

Go MAEDA, 2022-08-28 07:15

View differences:

app/models/repository/git.rb
133 133
  # before fetching changesets (eg. for offline resync)
134 134
  def fetch_changesets
135 135
    scm_brs = branches
136
    return if scm_brs.nil? || scm_brs.empty?
136
    return if scm_brs.blank?
137 137

  
138 138
    h1 = extra_info || {}
139 139
    h  = h1.dup
......
246 246

  
247 247
  def latest_changesets(path, rev, limit=10)
248 248
    revisions = scm.revisions(path, nil, rev, :limit => limit, :all => false)
249
    return [] if revisions.nil? || revisions.empty?
249
    return [] if revisions.blank?
250 250

  
251 251
    changesets.where(:scmid => revisions.map {|c| c.scmid}).to_a
252 252
  end
(1-1/6)