• Nick Thomas's avatar
    Use title, not full_title for commit mentionables · d33a2258
    Nick Thomas authored
    Currently, the first line of a commit message is processed twice by
    Commit#all_references, which can be a performance issue if it is very
    long. In those cases, `title` returns the first 100 characters of the
    line while `description` contains the full line, so this minimises the
    amount of text that must be processed.
    
    In cases with a short title and more lines after, i.e., well-formed
    commit messages, the first line does not appear in the description, so
    we do need both `attr_mentionable`s for references to be scanned.
    
    Changelog: performance
    d33a2258
commit.rb 13.8 KB