mirror of
https://github.com/redmine/redmine.git
synced 2025-12-16 05:20:28 +01:00
code cleanup: rubocop: fix Style/MultipleComparison in lib/redmine/scm/adapters/git_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18798 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -235,7 +235,7 @@ module Redmine
|
||||
key = "commit"
|
||||
value = $1
|
||||
parents_str = $2
|
||||
if (parsing_descr == 1 || parsing_descr == 2)
|
||||
if [1, 2].include?(parsing_descr)
|
||||
parsing_descr = 0
|
||||
revision = Revision.new({
|
||||
:identifier => changeset[:commit],
|
||||
@@ -269,15 +269,15 @@ module Redmine
|
||||
elsif (parsing_descr == 0) && line.chomp.to_s == ""
|
||||
parsing_descr = 1
|
||||
changeset[:description] = +""
|
||||
elsif (parsing_descr == 1 || parsing_descr == 2) \
|
||||
&& line =~ /^:\d+\s+\d+\s+[0-9a-f.]+\s+[0-9a-f.]+\s+(\w)\t(.+)$/
|
||||
elsif [1, 2].include?(parsing_descr) &&
|
||||
line =~ /^:\d+\s+\d+\s+[0-9a-f.]+\s+[0-9a-f.]+\s+(\w)\t(.+)$/
|
||||
parsing_descr = 2
|
||||
fileaction = $1
|
||||
filepath = $2
|
||||
p = scm_iconv('UTF-8', @path_encoding, filepath)
|
||||
files << {:action => fileaction, :path => p}
|
||||
elsif (parsing_descr == 1 || parsing_descr == 2) \
|
||||
&& line =~ /^:\d+\s+\d+\s+[0-9a-f.]+\s+[0-9a-f.]+\s+(\w)\d+\s+(\S+)\t(.+)$/
|
||||
elsif [1, 2].include?(parsing_descr) &&
|
||||
line =~ /^:\d+\s+\d+\s+[0-9a-f.]+\s+[0-9a-f.]+\s+(\w)\d+\s+(\S+)\t(.+)$/
|
||||
parsing_descr = 2
|
||||
fileaction = $1
|
||||
filepath = $3
|
||||
|
||||
Reference in New Issue
Block a user