Fix 404 on empty branch
This commit is contained in:
parent
420cdc6a52
commit
d1e00b1eb6
1 changed files with 1 additions and 2 deletions
|
@ -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]
|
||||
|
||||
|
|
Loading…
Reference in a new issue