summaryrefslogtreecommitdiff
path: root/app/models/commit_range.rb
diff options
context:
space:
mode:
authorMike Lewis <mlewis@gitlab.com>2019-03-07 15:59:00 +0000
committerMike Lewis <mlewis@gitlab.com>2019-03-07 15:59:00 +0000
commitdbd7309a16bd3abc6c586b6c2df2beb317cfef95 (patch)
tree3fdd719c926ac80285f0dc93ef975625657d0fbb /app/models/commit_range.rb
parent7be248334b350091e83d0335bf0c263071c6a67f (diff)
parentb63efb09a5c864047924cd2d84527b47dd563d5f (diff)
downloadgitlab-ce-reply-to-comment-documentation.tar.gz
Merge branch 'master' into 'reply-to-comment-documentation'reply-to-comment-documentation
# Conflicts: # doc/user/discussions/index.md
Diffstat (limited to 'app/models/commit_range.rb')
-rw-r--r--app/models/commit_range.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/commit_range.rb b/app/models/commit_range.rb
index 094747ee48d..920b1d092dd 100644
--- a/app/models/commit_range.rb
+++ b/app/models/commit_range.rb
@@ -134,25 +134,25 @@ class CommitRange
end
def sha_from
- return nil unless @commit_from
+ return unless @commit_from
@commit_from.id
end
def sha_to
- return nil unless @commit_to
+ return unless @commit_to
@commit_to.id
end
def sha_start
- return nil unless sha_from
+ return unless sha_from
exclude_start? ? sha_from + '^' : sha_from
end
def commit_start
- return nil unless sha_start
+ return unless sha_start
if exclude_start?
@commit_start ||= project.commit(sha_start)