]> source.dussan.org Git - redmine.git/commitdiff
scm: early return in diff if diff is nil as same as show, changes, and etc. (#31141...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 30 May 2019 06:57:09 +0000 (06:57 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 30 May 2019 06:57:09 +0000 (06:57 +0000)
Contributed by Mizuki ISHIKAWA.

git-svn-id: http://svn.redmine.org/redmine/trunk@18206 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/repositories_controller.rb

index a35e2956cf6b52338675d17b510c1b8b8ce5993b..9f474546444de557ba10ecc0906c71d8be8efabc 100644 (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)