On Jun 17, 2016, at 1:59 PM, Scott Robison <[email protected]> wrote: > > Would it be a bad thing to just settle on LF only going forward, always > stripping CR?
The argument over canonicalizing all text input to LF has been had here before — with me as at least one of its proponents — but I did not get the sense that the proposal was getting much traction. But what the hey, I’ll make another stab: For any blob data that Fossil considers “text,” why not strip all CRs on ingest, then based on either a setting or platform check inject CRs as necessary when expelling a copy from the DB? Then users checking out on Windows will see the CRLFs they want, and Fossil doesn’t have to deal with CRs appearing and disappearing as different users on different platforms edit the same files? If the CR stripper sees that after stripping the CRs that reinjecting them before every LF gives a different blob, it should cope in some intelligent fashion: 1. Report that a text-like document seems to have mixed line ending styles, and ask the user if it’s okay to canonicalize it anyway. This addresses the case where a non-text file that merely happens to pass the “is it text?” check shouldn’t be molested. 2. Use the crnl-glob setting to bypass case 1. This gives you a way to whitelist certain files as always being text, and thus always safe to canonicalize. 3. Add a disabled-by-default setting to turn all this off, returning Fossil to its current behavior. _______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

