mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-31 11:37:14 +00:00
Fix RuboCop offense Style/IfUnlessModifier (#37614).
git-svn-id: https://svn.redmine.org/redmine/trunk@21842 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
b7e477ea7f
commit
f17e8507c5
@ -27,9 +27,7 @@ class Repository::Git < Repository
|
||||
|
||||
def self.human_attribute_name(attribute_key_name, *args)
|
||||
attr_name = attribute_key_name.to_s
|
||||
if attr_name == "url"
|
||||
attr_name = "path_to_repository"
|
||||
end
|
||||
attr_name = 'path_to_repository' if attr_name == 'url'
|
||||
super(attr_name, *args)
|
||||
end
|
||||
|
||||
@ -140,9 +138,7 @@ class Repository::Git < Repository
|
||||
repo_heads = scm_brs.map(&:scmid)
|
||||
h["heads"] ||= []
|
||||
prev_db_heads = h["heads"].dup
|
||||
if prev_db_heads.empty?
|
||||
prev_db_heads += heads_from_branches_hash
|
||||
end
|
||||
prev_db_heads += heads_from_branches_hash if prev_db_heads.empty?
|
||||
return if prev_db_heads.sort == repo_heads.sort
|
||||
|
||||
h["db_consistent"] ||= {}
|
||||
@ -230,9 +226,7 @@ class Repository::Git < Repository
|
||||
:comments => rev.message,
|
||||
:parents => parents
|
||||
)
|
||||
unless changeset.new_record?
|
||||
rev.paths.each {|change| changeset.create_change(change)}
|
||||
end
|
||||
rev.paths.each {|change| changeset.create_change(change)} unless changeset.new_record?
|
||||
changeset
|
||||
end
|
||||
private :save_revision
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user