Error 500 - commit diff - commit is one file's mode changed
Created by: Leryan
Hi,
I viewed some similar errors in issues, but here is something a little different:
Started GET "/USERNAME/PROJECTNAME/commit/a4fe660c179810a66a14a22f05262990bb8fcb5b" for 81.240.163.204 at 2014-10-10 16:40:17 +0200
Processing by Projects::CommitController#show as HTML
Parameters: {"project_id"=>"USERNAME/PROJECTNAME", "id"=>"a4fe660c179810a66a14a22f05262990bb8fcb5b"}
Completed 500 Internal Server Error in 80ms
ActionView::Template::Error (undefined local variable or method `diff' for #<#<Class:0x007fe19e963778>:0x007fe195da6c80>):
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__1164613213287102789_70303511592020'
app/views/projects/diffs/_diffs.html.haml:20:in `block in _app_views_projects_diffs__diffs_html_haml__3463179959142329275_70303508162680'
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__3463179959142329275_70303508162680'
app/views/projects/commit/show.html.haml:2:in `_app_views_projects_commit_show_html_haml__3773890943290179763_70303502500360'
app/controllers/projects/commit_controller.rb:39:in `show'
In this commit, only a file changed of mode from rw-rw-r to rwxrwxr-x, it is located in the project's root and file named "pylint.sh".
It is fully reproducible.
Hope it will help.