diff options
author | Go MAEDA <maeda@farend.jp> | 2022-09-25 04:58:53 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2022-09-25 04:58:53 +0000 |
commit | f17e8507c51cb8480eb778d29e65766c6b587d12 (patch) | |
tree | 0302a95d2e576d9b4caab1743701c680d898cfbc /app | |
parent | b7e477ea7f34fe9db944de62cc125d34597f0f53 (diff) | |
download | redmine-f17e8507c51cb8480eb778d29e65766c6b587d12.tar.gz redmine-f17e8507c51cb8480eb778d29e65766c6b587d12.zip |
Fix RuboCop offense Style/IfUnlessModifier (#37614).
git-svn-id: https://svn.redmine.org/redmine/trunk@21842 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/repository/git.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/app/models/repository/git.rb b/app/models/repository/git.rb index 66dea18d9..ed0ce7b57 100644 --- a/app/models/repository/git.rb +++ b/app/models/repository/git.rb @@ -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 |