diff options
author | Rémy Coutable <remy@rymai.me> | 2017-11-27 13:36:03 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-11-27 13:36:03 +0000 |
commit | 8ab0fceeef146831336b82c649dfae433b770271 (patch) | |
tree | ff71ba8938e172ed6471522a1129174f8cbce96e | |
parent | 420cdc6a5266df6de6767e3e3886e0019ae0ec6e (diff) | |
parent | d1e00b1eb65a57b3103a882611d9ee03ce234d45 (diff) | |
download | gitlab-ce-8ab0fceeef146831336b82c649dfae433b770271.tar.gz |
Merge branch '40273_404_on_commits_page_when_all_files_on_branch_deleted' into 'master'
Fix 404 on commits list for branch that doesn't have any files
See merge request gitlab-org/gitlab-ce!15603
-rw-r--r-- | app/controllers/projects/commits_controller.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/projects/commits_controller.rb b/app/controllers/projects/commits_controller.rb index 5f4afd2cdee..026708169f4 100644 --- a/app/controllers/projects/commits_controller.rb +++ b/app/controllers/projects/commits_controller.rb @@ -45,8 +45,7 @@ class Projects::CommitsController < Projects::ApplicationController private def set_commits - render_404 unless request.format == :atom || @repository.blob_at(@commit.id, @path) || @repository.tree(@commit.id, @path).entries.present? - + render_404 unless @path.empty? || request.format == :atom || @repository.blob_at(@commit.id, @path) || @repository.tree(@commit.id, @path).entries.present? @limit, @offset = (params[:limit] || 40).to_i, (params[:offset] || 0).to_i search = params[:search] |