diff options
author | haseeb <haseebeqx@gmail.com> | 2017-11-27 13:36:02 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-11-27 13:36:02 +0000 |
commit | d1e00b1eb65a57b3103a882611d9ee03ce234d45 (patch) | |
tree | ff71ba8938e172ed6471522a1129174f8cbce96e | |
parent | 420cdc6a5266df6de6767e3e3886e0019ae0ec6e (diff) | |
download | gitlab-ce-d1e00b1eb65a57b3103a882611d9ee03ce234d45.tar.gz |
Fix 404 on empty branch
-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] |