Extend HasRepository#default_branch method to return `main` by default
Follow-up to !60258 (comment 563592962) discussion. Let's try and move the logic from this method to https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/models/concerns/has_repository.rb#L74 concern and fix the tests.
Other classes that include HasRepository
(like snippets, wikis...) will benefit from this refactor as well
Edited by Igor Drozdov