app/models/merge_request_diff.rb
def unmerged_commits
    commits = compare.commits

    if commits.present?
      commits = Commit.decorate(commits, merge_request.source_project).
        sort_by(&:created_at).
        reverse
    end

    commits
  end
# Collect array of Git::Commit objects
# between target and source branches
Collect array of Git::Commit objects
between target and source branches
Collect array of Git :: Commit objects between target and source branches
def unmerged_commits
    commits = compare.commits
    if commits.present?
      commits = Commit.decorate(commits, merge_request.source_project).
        sort_by(&:created_at).
        reverse
    end
    commits
  end
def unmerged_commits commits = compare . commits if commits . present? commits = Commit . decorate ( commits , merge_request . source_project ) . sort_by ( & :created_at ) . reverse end commits end
Collect array of Git::Commit objects
between target and source branches
Collect array of Git :: Commit objects between target and source branches