Re: [PATCH] send-email: Fix Pine address book parsing
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 26, 2008, 06:44 UTC
- Message-ID
- <7vy6z7gf4x.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <Pine.LNX.4.64.0811252137250.5161@t2.domain.actdsltmp>
Trent Piepho <tpiepho@freescale.com> writes:
> The tech docs I linked to just say pine continues lines with leading space, > but not how many spaces exactly.
My reading of the wording "spaces" it uses is that any number. I agree it is underspecified what would happen to them.
Show 5 quoted lines
> It also appears to only split lines between whitespace and > non-whitespace. ... > ... like "a b \n c \n d\n". If I didn't eat the leading spaces in the > continuations, it would be re-assembled as "a b c d". This might cause > an address to become "John Doe <jdoe@anon.org>"
Which would still work. If you had two addresses a and b and smashed them together into ab on the other hand it wouldn't. That is why I asked.
If you know for sure (e.g. by reading the Pine source) that it only splits a line at a whitespace to non-whitespace transition, that it keeps the whitespace at the end of the first line, and that the non-whitespace and everything after that on the second line (prefixed by extra unspecified number of spaces as the continuation sign), then I think what you had in your patch is exactly what we want. I just wanted to make sure you know what you are doing, as I do not use Pine nor its address book myself.