app/models/commit.rb
# 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.
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.
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 .
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] << "&hellip;".html_safe
    else
      title.split(/\n/, 2).first
    end
  end
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 ] << "&hellip;" . html_safe else title . split ( / \n / , 2 ) . first end end
Returns the commits title.
Returns the commits title .