Merge-request changes tab crash with forking
Philippe forked my bighgperf repo https://heptapod.octobus.net/octobus-public/bighgperf and create a MR https://heptapod.octobus.net/octobus-public/bighgperf/merge_requests/2/commits
The changes tab on the MR crash https://heptapod.octobus.net/octobus-public/bighgperf/merge_requests/2/diffs
The relevant traceback in log seems to be:
Processing by Projects::MergeRequests::DiffsController#show as JSON
Parameters: {"namespace_id"=>"octobus-public", "project_id"=>"bighgperf", "id"=>"2"}
Completed 500 Internal Server Error in 82ms (ActiveRecord: 3.9ms)
ActionView::Template::Error (undefined method `[]' for nil:NilClass):
19: - if image_diff && image_replaced
20: = view_file_button(diff_file.old_content_sha, diff_file.old_path, project, replaced: true)
21:
22: = view_file_button(diff_file.content_sha, diff_file.file_path, project)
23: = view_on_environment_button(diff_file.content_sha, diff_file.file_path, environment) if environment
24:
25: = render 'projects/fork_suggestion'
app/models/commit.rb:56:in `truncate_sha'
app/helpers/commits_helper.rb:205:in `truncate_sha'
app/helpers/commits_helper.rb:188:in `block in view_file_button'
app/helpers/commits_helper.rb:182:in `view_file_button'
app/views/projects/diffs/_file.html.haml:22:in `_app_views_projects_diffs__file_html_haml___3643828193321276867_69910592937540'
app/views/projects/diffs/_diffs.html.haml:28:in `_app_views_projects_diffs__diffs_html_haml__2670589013129813169_69910588255680'
app/views/projects/merge_requests/diffs/_diffs.html.haml:3:in `_app_views_projects_merge_requests_diffs__diffs_html_haml__1483594632090195770_69910590608900'
app/controllers/application_controller.rb:268:in `view_to_html_string'
app/controllers/projects/merge_requests/diffs_controller.rb:15:in `block in show'
lib/gitlab/gitaly_client.rb:193:in `allow_n_plus_1_calls'
app/controllers/projects/merge_requests/diffs_controller.rb:14:in `show'
lib/gitlab/i18n.rb:47:in `with_locale'
lib/gitlab/i18n.rb:53:in `with_user_locale'
app/controllers/application_controller.rb:346:in `set_locale'
lib/gitlab/middleware/multipart.rb:93:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:17:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/read_only.rb:30:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'