500 on diff of old mergerequests (before moving to namespaces)
Created by: Razer6
When I click on old merge requests, which were merged before the move to own namespace result a 500. New merge merge requests which where merged after the movement to new namespace work.
Log:
ActionView::Template::Error (undefined method `tree' for nil:NilClass):
16: - diffs.each_with_index do |diff, i|
17: - next if diff.diff.empty?
18: - file = (@commit.tree / diff.new_path)
19: - file = (@commit.prev_commit.tree / diff.old_path) unless file
20: - next unless file
21: .diff_file{id: "diff-#{i}"}
22: .diff_file_header
app/views/commits/_diffs.html.haml:19:in `block in _app_views_commits__diffs_html_haml__2005420610907640399_44452180'
app/views/commits/_diffs.html.haml:16:in `each'
app/views/commits/_diffs.html.haml:16:in `each_with_index'
app/views/commits/_diffs.html.haml:16:in `_app_views_commits__diffs_html_haml__2005420610907640399_44452180'
app/views/merge_requests/show/_diffs.html.haml:2:in `_app_views_merge_requests_show__diffs_html_haml___3724326574592273078_44405600'
app/views/merge_requests/diffs.js.haml:2:in `_app_views_merge_requests_diffs_js_haml___3708745802829537282_44359580'
Running on: 4.1.0pre c8ba5c2d