summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index ee16bf084de..f11b7fe0202 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -159,6 +159,8 @@ class Commit
while !lines.first.start_with?("diff --git") do
lines.shift
end
+ lines.pop if lines.last =~ /^[\d.]+$/ # Git version
+ lines.pop if lines.last == "-- " # end of diff
lines.join("\n")
end
end