1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-06 07:31:31 +00:00

scm: early return in diff if diff is nil as same as show, changes, and etc. (#31141, #30850)

Contributed by Mizuki ISHIKAWA.

git-svn-id: http://svn.redmine.org/redmine/trunk@18206 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-05-30 06:57:09 +00:00
parent 820cbe618e
commit e0738ac6e9

View File

@ -257,7 +257,7 @@ class RepositoriesController < ApplicationController
Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}-#{current_language}")
unless read_fragment(@cache_key)
@diff = @repository.diff(@path, @rev, @rev_to)
show_error_not_found unless @diff
(show_error_not_found; return) unless @diff
end
@changeset = @repository.find_changeset_by_name(@rev)