Re: [PATCH 4/4] Allow mailsplit (and hence git-am) to handle mails with CRLF line-endings
On Wed, Aug 5, 2009 at 05:31, Brandon Casey<casey@nrlssc.navy.mil> wrote:
Show 10 quoted lines
> @@ -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 :)