mirror of
https://github.com/gitlabhq/gitlabhq.git
synced 2025-07-21 23:56:17 +00:00
Add latest changes from gitlab-org/gitlab@17-11-stable-ee
This commit is contained in:
@ -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
|
||||
|
@ -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" }
|
||||
|
||||
|
Reference in New Issue
Block a user