aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/email/patch.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-11-17 18:54:19 +0100
committerDmitry Vyukov <dvyukov@google.com>2017-11-17 18:54:19 +0100
commit00f6ff581c6a4296baf3271e9114cc3a18da93e6 (patch)
tree0cf42e925471d4a60b2bfdbcbb31a260f849206d /pkg/email/patch.go
parent2950adb95c95c76906018f1de813a3270eb4a94f (diff)
pkg/email: truncate garbage after patches
Diffstat (limited to 'pkg/email/patch.go')
-rw-r--r--pkg/email/patch.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/email/patch.go b/pkg/email/patch.go
index 46a31a05d..d91a6a020 100644
--- a/pkg/email/patch.go
+++ b/pkg/email/patch.go
@@ -23,7 +23,8 @@ func ParsePatch(text string) (title string, diff string, err error) {
}
}
if parsingDiff {
- if ln == "--" || ln == "-- " {
+ if ln == "" || ln == "--" || ln == "-- " || ln[0] == '>' ||
+ ln[0] >= 'A' && ln[0] <= 'Z' {
break
}
diff += ln + "\n"