diff options
Diffstat (limited to 'app/models/concerns/has_repository.rb')
-rw-r--r-- | app/models/concerns/has_repository.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/concerns/has_repository.rb b/app/models/concerns/has_repository.rb index 9218ba47d20..d614d6c4584 100644 --- a/app/models/concerns/has_repository.rb +++ b/app/models/concerns/has_repository.rb @@ -72,12 +72,10 @@ module HasRepository end def default_branch - @default_branch ||= repository.root_ref || default_branch_from_preferences + @default_branch ||= repository.empty? ? default_branch_from_preferences : repository.root_ref end def default_branch_from_preferences - return unless empty_repo? - (default_branch_from_group_preferences || Gitlab::CurrentSettings.default_branch_name).presence end |