summaryrefslogtreecommitdiffstats
path: root/lib/redmine/unified_diff.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-02-23 07:03:45 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-02-23 07:03:45 +0000
commit35f075d8ad7d0ff190bcfec42e7ea061a8255e92 (patch)
treef9959e20f6694257b3dc10f7874e8c309d31ccb2 /lib/redmine/unified_diff.rb
parent7dfd0bf67920c000ff1f3a268d2596930f35af4f (diff)
downloadredmine-35f075d8ad7d0ff190bcfec42e7ea061a8255e92.tar.gz
redmine-35f075d8ad7d0ff190bcfec42e7ea061a8255e92.zip
scm: fix diffs do not handle one line new files properly (#7618).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4929 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/unified_diff.rb')
-rw-r--r--lib/redmine/unified_diff.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/unified_diff.rb b/lib/redmine/unified_diff.rb
index 65d880dd7..430b1254a 100644
--- a/lib/redmine/unified_diff.rb
+++ b/lib/redmine/unified_diff.rb
@@ -36,7 +36,7 @@ module Redmine
end
unless diff_table.add_line line
line.force_encoding(line_encoding) if line_encoding
- self << diff_table if diff_table.length > 1
+ self << diff_table if diff_table.length > 0
diff_table = DiffTable.new(diff_type)
end
lines += 1