Add latest changes from gitlab-org/gitlab@17-11-stable-ee

This commit is contained in:
GitLab Bot
2025-07-07 21:39:12 +00:00
parent df44b2a3ab
commit aea9eb17bb
2 changed files with 11 additions and 1 deletions

View File

@ -70,7 +70,7 @@ class Projects::CommitsController < Projects::ApplicationController
end
def validate_path
return unless @path
return if @path.blank?
path_exists = @repository.blob_at(@commit.id, @path) || @repository.tree(@commit.id, @path).entries.present?
redirect_to_tree_root_for_missing_path(@project, @ref, @path) unless path_exists

View File

@ -88,6 +88,16 @@ RSpec.describe Projects::CommitsController, feature_category: :source_code_manag
end
end
context 'when branch has only empty commits' do
let(:id) { 'empty-branch' }
it 'allows to see commits' do
request
is_expected.to respond_with(:success)
end
end
context "with an invalid limit" do
let(:id) { "master/README.md" }