Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 09fe9f11dd4..594972ad344 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -193,12 +193,9 @@ class Commit
# otherwise returns commit message without first line
def description
return safe_message if full_title.length >= 100
+ return no_commit_message if safe_message.blank?
- if safe_message.blank?
- no_commit_message
- else
- safe_message.split("\n", 2)[1].try(:chomp)
- end
+ safe_message.split("\n", 2)[1].try(:chomp)
end
def description?