summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-09-12 18:10:08 +0200
committerRémy Coutable <remy@rymai.me>2016-09-12 18:10:08 +0200
commit23612ada54381487692cca76523dfad8a201f618 (patch)
treefe3ad31d8134ca80e0b5d976633324a72622b287 /app
parent08dc8af7339828852ae8596aeea577f9551d399d (diff)
downloadgitlab-ce-23612ada54381487692cca76523dfad8a201f618.tar.gz
Simplify a condition in Repository#update_file
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app')
-rw-r--r--app/models/repository.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 37fbdcfe1c6..3c354c25c6f 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -813,7 +813,7 @@ class Repository
update: true
}
- unless previous_path == path || previous_path.blank?
+ if previous_path && previous_path != path
options[:file][:previous_path] = previous_path
Gitlab::Git::Blob.rename(raw_repository, options)
else