Merged requested to merge haynes/gitlab-ce:fix_initial_push_mass_sql into master
What does this MR do?
This MR prevents
process_commit_messages(ref) to be executed for the initial push to the default branch.
Currently it is being executed which results in ~500000 SQL Statements during the import of the linux mainline repository.
These statements check for references to issues/mrs in each commit.
That usually doesn't make sense for the initial push, because there aren't any issues/mrs yet.
This MR will reduce the load on gitlab servers in the coming months. Especially now that several importers are available for gitlab and projects are moving from gitorious to gitlab.