From 12de6a177ac2a5aa32c54a5972e16170098a4426 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 18 Sep 2012 19:32:58 +0000 Subject: Fixed that git diff displays deleted files as /dev/null (#11868). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10424 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/attachments/diff.html.erb | 2 +- app/views/common/_diff.html.erb | 3 ++- app/views/repositories/diff.html.erb | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/views/attachments/diff.html.erb b/app/views/attachments/diff.html.erb index 5359d4eea..f429ba3f8 100644 --- a/app/views/attachments/diff.html.erb +++ b/app/views/attachments/diff.html.erb @@ -15,7 +15,7 @@ :onchange => "if (this.value != '') {this.form.submit()}" %> <% end %>

-<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %> +<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type, :diff_style => nil} %> <% html_title @attachment.filename %> diff --git a/app/views/common/_diff.html.erb b/app/views/common/_diff.html.erb index cf99967f7..8600164c0 100644 --- a/app/views/common/_diff.html.erb +++ b/app/views/common/_diff.html.erb @@ -1,6 +1,7 @@ <% diff = Redmine::UnifiedDiff.new( diff, :type => diff_type, - :max_lines => Setting.diff_max_lines_displayed.to_i) -%> + :max_lines => Setting.diff_max_lines_displayed.to_i, + :style => diff_style) -%> <% diff.each do |table_file| -%>
diff --git a/app/views/repositories/diff.html.erb b/app/views/repositories/diff.html.erb index ecd19ccf8..050e53552 100644 --- a/app/views/repositories/diff.html.erb +++ b/app/views/repositories/diff.html.erb @@ -14,7 +14,7 @@ <% end %> <% cache(@cache_key) do -%> -<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %> +<%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type, :diff_style => @repository.class.scm_name} %> <% end -%> <% other_formats_links do |f| %> -- cgit v1.2.3