diff options
author | Rémy Coutable <remy@rymai.me> | 2016-09-12 18:10:08 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-09-12 18:10:08 +0200 |
commit | 23612ada54381487692cca76523dfad8a201f618 (patch) | |
tree | fe3ad31d8134ca80e0b5d976633324a72622b287 /app | |
parent | 08dc8af7339828852ae8596aeea577f9551d399d (diff) | |
download | gitlab-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.rb | 2 |
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 |