Error 500 on trying to view Merge Commit
We're getting an Error 500 when trying to view some commits in GitLab. This is not the case for every commit, but it at least happens on some. Log says:
Started GET "/groupname/projectname/commit/82a34f3efda7e576ae06df2d403b44616a1586d9" for 172.21.0.1 at 2014-09-23 19:38:36 +0200
Processing by Projects::CommitController#show as HTML
Parameters: {"project_id"=>"groupname/projectname", "id"=>"82a34f3efda7e576ae06df2d403b44616a1586d9"}
Completed 500 Internal Server Error in 849ms
ActionView::Template::Error (undefined local variable or method `diff' for #<#<Class:0x00000006464c80>:0x0000000645f2a8>):
12: - else
13: %span= diff_file.new_path
14: - if diff_file.mode_changed?
15: %span.file-mode= "#{diff.a_mode} → #{diff.b_mode}"
16:
17: .diff-btn-group
18: - unless params[:view] == 'parallel'
app/views/projects/diffs/_file.html.haml:15:in `_app_views_projects_diffs__file_html_haml__3621159641667946310_48686920'
app/views/projects/diffs/_diffs.html.haml:20:in `block in _app_views_projects_diffs__diffs_html_haml__3019705684044142447_50591640'
app/views/projects/diffs/_diffs.html.haml:19:in `each'
app/views/projects/diffs/_diffs.html.haml:19:in `each_with_index'
app/views/projects/diffs/_diffs.html.haml:19:in `_app_views_projects_diffs__diffs_html_haml__3019705684044142447_50591640'
app/views/projects/commit/show.html.haml:2:in `_app_views_projects_commit_show_html_haml__3762555795159548710_52618900'
app/controllers/projects/commit_controller.rb:39:in `show'
Started GET "/groupname/projectname/commit/82a34f3efda7e576ae06df2d403b44616a1586d9" for 172.21.0.1 at 2014-09-23 19:38:37 +0200
Processing by Projects::CommitController#show as HTML
Parameters: {"project_id"=>"groupname/projectname", "id"=>"82a34f3efda7e576ae06df2d403b44616a1586d9"}
Completed 500 Internal Server Error in 774ms
ActionView::Template::Error (undefined local variable or method `diff' for #<#<Class:0x00000006464c80>:0x00000002e21510>):
12: - else
13: %span= diff_file.new_path
14: - if diff_file.mode_changed?
15: %span.file-mode= "#{diff.a_mode} → #{diff.b_mode}"
16:
17: .diff-btn-group
18: - unless params[:view] == 'parallel'
app/views/projects/diffs/_file.html.haml:15:in `_app_views_projects_diffs__file_html_haml__3621159641667946310_48686920'
app/views/projects/diffs/_diffs.html.haml:20:in `block in _app_views_projects_diffs__diffs_html_haml__3019705684044142447_50591640'
app/views/projects/diffs/_diffs.html.haml:19:in `each'
app/views/projects/diffs/_diffs.html.haml:19:in `each_with_index'
app/views/projects/diffs/_diffs.html.haml:19:in `_app_views_projects_diffs__diffs_html_haml__3019705684044142447_50591640'
app/views/projects/commit/show.html.haml:2:in `_app_views_projects_commit_show_html_haml__3762555795159548710_52618900'
app/controllers/projects/commit_controller.rb:39:in `show'