Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-12-05 00:14:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-05 00:14:01 +0300
commitf4056ff4474daf3da66ceaf4473306b0c4652897 (patch)
treeba6ca64ede0a7ec8d2c6971c7f3f5b3d8ab5f81d /app/controllers
parent795b6eb292706d577c13556a3583897f082dda6e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects_controller.rb4
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)