Commit 5d1044c3 authored by Riyad Preukschas's avatar Riyad Preukschas

Fix Commit#to_diff

parent 056fa05b
...@@ -159,6 +159,8 @@ class Commit ...@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment