From: Toshi MARUYAMA Date: Thu, 30 May 2019 06:57:09 +0000 (+0000) Subject: scm: early return in diff if diff is nil as same as show, changes, and etc. (#31141... X-Git-Tag: 4.1.0~848 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e0738ac6e9b94b247a17375432031c98311a5bb9;p=redmine.git 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 --- diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index a35e2956c..9f4745464 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -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)