diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-05 00:14:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-05 00:14:01 +0300 |
commit | f4056ff4474daf3da66ceaf4473306b0c4652897 (patch) | |
tree | ba6ca64ede0a7ec8d2c6971c7f3f5b3d8ab5f81d /app/controllers | |
parent | 795b6eb292706d577c13556a3583897f082dda6e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index ef87fedf538..b8b79192d3f 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -397,6 +397,7 @@ class ProjectsController < Projects::ApplicationController if can?(current_user, :read_code, @project) return render 'projects/no_repo' unless @project.repository_exists? + return render 'projects/missing_default_branch', status: :service_unavailable if @ref == '' render 'projects/empty' if @project.empty_repo? else @@ -553,6 +554,9 @@ class ProjectsController < Projects::ApplicationController # Override get_id from ExtractsPath in this case is just the root of the default branch. def get_id project.repository.root_ref + rescue Gitlab::Git::CommandError + # Empty string is intentional and prevent the @ref reload + '' end def build_canonical_path(project) |