# Returns the commits title.
#
# Usually, the commit title is the first line of the commit message.
- # In case this first line is longer than 80 characters, it is cut off
- # after 70 characters and ellipses (`&hellp;`) are appended.
+ # In case this first line is longer than 100 characters, it is cut off
+ # after 80 characters and ellipses (`&hellp;`) are appended.
def title
title = safe_message
return no_commit_message if title.blank?
title_end = title.index(/\n/)
- if (!title_end && title.length > 80) || (title_end && title_end > 80)
- title[0..69] << "…".html_safe
+ if (!title_end && title.length > 100) || (title_end && title_end > 100)
+ title[0..79] << "…".html_safe
else
title.split(/\n/, 2).first
end
description = safe_message
title_end = description.index(/\n/)
- if (!title_end && description.length > 80) || (title_end && title_end > 80)
- "…".html_safe << description[70..-1]
+ if (!title_end && description.length > 100) || (title_end && title_end > 100)
+ "…".html_safe << description[80..-1]
else
description.split(/\n/, 2)[1].try(:chomp)
end