• Nick Thomas's avatar
    Make Commit#has_been_reverted? cheaper · 8ba07f7d
    Nick Thomas authored
    There is no way in git to efficiently tell if a commit has been
    reverted. Instead, GitLab creates system notes when we perform this
    action in the web UI. These are introspected to answer the question;
    doing so requires us to extract commit references from those notes.
    
    With this change, we stop extracting commit references from the message
    of the commit that is under question. This is user-controlled content
    and we can't control the number of references in it. Further, since the
    revert happens *after* that commit message is written, there is no way
    for it to contain references to a reverting commit.
    8ba07f7d
commit.rb 13.1 KB