[7.4.0.rc1] 500 error when trying to access certain commit diff pages
Created by: Libbux
Certain (but not all) commit diff pages are broken in 7.4.0.rc1 (564c4138). They return a 500 error.
Log output for one of the bad requests:
Started GET "/organization/repo/commit/075ea9b8207d1fac4d428a1a038b7f38006014a6" for x.x.x.x at 2014-10-20 23:21:48 -0400
Processing by Projects::CommitController#show as HTML
Parameters: {"project_id"=>"organization/repo", "id"=>"075ea9b8207d1fac4d428a1a038b7f38006014a6"}
Completed 500 Internal Server Error in 483ms
ActionView::Template::Error (undefined method `[]' for #<Enumerator:0xbfc52a0>):
1: - too_big = diff_file.diff_lines.count > Commit::DIFF_SAFE_LINES
2: - if too_big
3: %a.supp_diff_link Changes suppressed. Click to show
4:
lib/gitlab/inline_diff.rb:12:in `block in processing'
lib/gitlab/inline_diff.rb:11:in `each'
lib/gitlab/inline_diff.rb:11:in `processing'
lib/gitlab/diff/parser.rb:14:in `parse'
lib/gitlab/diff/file.rb:15:in `diff_lines'
app/views/projects/diffs/_text_file.html.haml:1:in `_app_views_projects_diffs__text_file_html_haml___1009656741_116439010'
app/views/projects/diffs/_file.html.haml:43:in `_app_views_projects_diffs__file_html_haml__552782369_117809830'
app/views/projects/diffs/_diffs.html.haml:20:in `block in _app_views_projects_diffs__diffs_html_haml___125597810_100909760'
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___125597810_100909760'
app/views/projects/commit/show.html.haml:2:in `_app_views_projects_commit_show_html_haml__193857444_128338300'
app/controllers/projects/commit_controller.rb:27:in `show'
This issue doesn't seem to be too critical. I haven't identified any patterns in which commit diff pages work and which don't, but I'll report back here if I do.
UPDATE: This also occurs with compare pages, with an entry in production.log
that's nearly identical to the one above.
Thanks.