On Wed, Aug 5, 2009 at 05:31, Brandon Casey[off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -69,6 +70,12 @@ static int split_one(FILE *mbox, const char *name, int allow_bare)
* "From " and having something that looks like a date format.
*/
for (;;) {
+ if (!keep_cr && buf.len > 1 && buf.buf[buf.len-1] == '\n' &&
+ buf.buf[buf.len-2] == '\r') {
+ strbuf_setlen(&buf, buf.len-2);
+ strbuf_addch(&buf, '\n');
+ }
+
That's much better then any on-the-fly corrections :)