From 23612ada54381487692cca76523dfad8a201f618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Mon, 12 Sep 2016 18:10:08 +0200 Subject: Simplify a condition in Repository#update_file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- app/models/repository.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1