summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-18 19:32:58 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-09-18 19:32:58 +0000
commit12de6a177ac2a5aa32c54a5972e16170098a4426 (patch)
treebc9b7031d32ff1f4dcdeab66008bd7153de661bd /app
parent74f7fc38f078e8574e15fbf860dd9e4c58f7000a (diff)
downloadredmine-12de6a177ac2a5aa32c54a5972e16170098a4426.tar.gz
redmine-12de6a177ac2a5aa32c54a5972e16170098a4426.zip
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
Diffstat (limited to 'app')
-rw-r--r--app/views/attachments/diff.html.erb2
-rw-r--r--app/views/common/_diff.html.erb3
-rw-r--r--app/views/repositories/diff.html.erb2
3 files changed, 4 insertions, 3 deletions
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 %>
</p>
-<%= 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| -%>
<div class="autoscroll">
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| %>