Project

General

Profile

Patch #37614 » 0002-Fix-RuboCop-offense-Style-SymbolProc.patch

Go MAEDA, 2022-08-28 07:15

View differences:

app/models/repository/git.rb
137 137

  
138 138
    h1 = extra_info || {}
139 139
    h  = h1.dup
140
    repo_heads = scm_brs.map{|br| br.scmid}
140
    repo_heads = scm_brs.map(&:scmid)
141 141
    h["heads"] ||= []
142 142
    prev_db_heads = h["heads"].dup
143 143
    if prev_db_heads.empty?
......
198 198
    offset = 0
199 199
    revisions_copy = revisions.clone # revisions will change
200 200
    while offset < revisions_copy.size
201
      scmids = revisions_copy.slice(offset, limit).map{|x| x.scmid}
201
      scmids = revisions_copy.slice(offset, limit).map(&:scmid)
202 202
      recent_changesets_slice = changesets.where(:scmid => scmids)
203 203
      # Subtract revisions that redmine already knows about
204
      recent_revisions = recent_changesets_slice.map{|c| c.scmid}
204
      recent_revisions = recent_changesets_slice.map(&:scmid)
205 205
      revisions.reject!{|r| recent_revisions.include?(r.scmid)}
206 206
      offset += limit
207 207
    end
......
248 248
    revisions = scm.revisions(path, nil, rev, :limit => limit, :all => false)
249 249
    return [] if revisions.blank?
250 250

  
251
    changesets.where(:scmid => revisions.map {|c| c.scmid}).to_a
251
    changesets.where(:scmid => revisions.map(&:scmid)).to_a
252 252
  end
253 253

  
254 254
  def clear_extra_info_of_changesets
(2-2/6)