Code compare - 500 - when branch have / on name
Created by: noose
Hi, I have branches with / on name (gitflow convention). When I go to "compare" tab, fills the inputs and try to see compare I have 500.
$ cat /home/gitlab/gitlab/log/production.log Started GET "/koszyk-secure/compare/feature/user-telephone...master" for 127.0.0.1 at 2013-02-28 11:04:01 +0100 Processing by CompareController#show as HTML Parameters: {"project_id"=>"koszyk-secure", "from"=>"feature/user-telephone", "to"=>"master"} Rendered shared/_ref_switcher.html.haml (5.9ms) Rendered commits/_head.html.haml (8.5ms) Rendered compare/_form.html.haml (1.4ms) Rendered commits/_commit.html.haml (6.1ms) Rendered commits/_diff_head.html.haml (11.4ms) Rendered commits/_text_file.html.haml (2.4ms) Rendered commits/_text_file.html.haml (11.7ms) Rendered commits/_text_file.html.haml (2.5ms) Rendered commits/_diffs.html.haml (40.9ms) Rendered compare/show.html.haml within layouts/project_resource (58.1ms) Completed 500 Internal Server Error in 1018ms
ActionView::Template::Error (undefined method lines' for nil:NilClass): 14: 15: - unless @suppress_diff 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 app/views/commits/_diffs.html.haml:17:in
block in _app_views_commits__diffs_html_haml___2368553359395589981_26160220'
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___2368553359395589981_26160220' app/views/compare/show.html.haml:16:in
_app_views_compare_show_html_haml__390200525833355473_70272647457180'