[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Re: the line-ending discussion
From: |
Yury Polyanskiy |
Subject: |
Re: [Monotone-devel] Re: the line-ending discussion |
Date: |
Thu, 02 Feb 2006 23:36:34 -0500 |
On Thu, 2006-02-02 at 21:48 -0600, Glen Ditchfield wrote:
> For operation 2, this is good. For operation 1, would it be good to split in
> a platform-agnostic manner, provided that the file is internally consistent?
> - If the file contains LFs but no CRs, split on LFs.
> - If the file contains CRs but no LFs, split on CRs.
> - If the file contains CRLFS but no single LFs or CRs, split on CRLF pairs
> - Otherwise, split on native line-ends.
Wow! That's really cool! Possible modifications:
1) "contains LFs" be defined as "contains 95% LFs in the first 8kb and
doesn't have a line longer than 500 chars".
2) otherwise print warning and switch file to binary mode.
Cheers,
-up