summaryrefslogtreecommitdiff
path: root/lib/gitlab/diff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-02-21 19:02:23 -0600
committerDouwe Maan <douwe@selenight.nl>2017-02-23 09:31:57 -0600
commit8a4d68c53e9c58ad7f8dce1494f7976292b2f929 (patch)
tree773814f7079c626cafabc229f929cafbe4d4b2e7 /lib/gitlab/diff
parent7ea641b6d0882fc782a7eb493daf8b66d076924b (diff)
downloadgitlab-ce-8a4d68c53e9c58ad7f8dce1494f7976292b2f929.tar.gz
Enable Style/ConditionalAssignment
Diffstat (limited to 'lib/gitlab/diff')
-rw-r--r--lib/gitlab/diff/position.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/diff/position.rb b/lib/gitlab/diff/position.rb
index ecf62dead35..81c93f1aab5 100644
--- a/lib/gitlab/diff/position.rb
+++ b/lib/gitlab/diff/position.rb
@@ -140,10 +140,10 @@ module Gitlab
def find_diff_file(repository)
# We're at the initial commit, so just get that as we can't compare to anything.
- if Gitlab::Git.blank_ref?(start_sha)
- compare = Gitlab::Git::Commit.find(repository.raw_repository, head_sha)
+ compare = if Gitlab::Git.blank_ref?(start_sha)
+ Gitlab::Git::Commit.find(repository.raw_repository, head_sha)
else
- compare = Gitlab::Git::Compare.new(
+ Gitlab::Git::Compare.new(
repository.raw_repository,
start_sha,
head_sha