Fix Commit#to_diff

This commit is contained in:
Riyad Preukschas 2012-12-22 20:36:33 +01:00
parent 056fa05b86
commit 5d1044c335

View file

@ -159,6 +159,8 @@ class Commit
while !lines.first.start_with?("diff --git") do while !lines.first.start_with?("diff --git") do
lines.shift lines.shift
end end
lines.pop if lines.last =~ /^[\d.]+$/ # Git version
lines.pop if lines.last == "-- " # end of diff
lines.join("\n") lines.join("\n")
end end
end end