# File lib/rubocop/git/options.rb, line 40 def commits=(commits) unless commits.is_a?(Array) && commits.length <= 2 fail Invalid, "invalid commits: #{commits.inspect}" end if !commits.empty? && cached fail Invalid, 'cached and commit cannot be specified together' end @commits = commits end