From e0738ac6e9b94b247a17375432031c98311a5bb9 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 30 May 2019 06:57:09 +0000 Subject: [PATCH] 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 --- app/controllers/repositories_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.5