aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/email/patch.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/email/patch.go')
-rw-r--r--pkg/email/patch.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkg/email/patch.go b/pkg/email/patch.go
index 67ea9005a..8af5e1b79 100644
--- a/pkg/email/patch.go
+++ b/pkg/email/patch.go
@@ -33,7 +33,14 @@ func ParsePatch(message []byte) (diff string) {
}
}
}
- if err := s.Err(); err != nil {
+ err := s.Err()
+ if err == bufio.ErrTooLong {
+ // It's a problem of the incoming patch, rather than anything else.
+ // Anyway, if a patch contains too long lines, we're probably not
+ // interested in it, so let's pretent we didn't see it.
+ diff = ""
+ return
+ } else if err != nil {
panic("error while scanning from memory: " + err.Error())
}
return