The case against "eol = clean"

John Arbash Meinel john at
Sat Mar 28 13:34:59 GMT 2009

Hash: SHA1

Ian Clatworthy wrote:
> Robert Collins wrote:
>> On Sat, 2009-03-28 at 13:04 +1000, Ian Clatworthy wrote:
>>> Robert Collins wrote:
>>>> On Sat, 2009-03-28 at 09:53 +1000, Ian Clatworthy wrote:
>>>>> I'm also considering adding a value called "clean". That would work
>>>>> exactly like "exact" except it would warn if mixed line-endings
>>>>> were found in a file. What do you think? Git has something like this
>>>>> so I gather it's of value to users.
>>>> -Rob
>>> I assume you meant to say something other than you name here? :-)
>> Yeah, I meant to have a +1 there. Dunno where it went :(.
> Exploring this more, I'm against "eol = clean" at the moment.
> It turns out the driver behind git's feature was detection of
> potential corruption in "binary" files that git thinks are text
> files. So that detection needs to happen *across* "eol = windows"
> and "eol = dos" matches - it's of limited/no value when the
> content is being checked in unchanged (as eol = exact does).

I'll just mention that a lot of editors do strange things sometimes.

I've copy & pasted from Thunderbird into Vim, and the text I copied was
then CRLF while the rest of the file was LF. This was *definitely* the
case in MSVC. It could handle LF files fine, and newly generated content
would be all LF, but copy & paste would sort of randomly decide based on
where you copied from.

I think having a "I don't care what it is, as long as it is consistent"
would be reasonable to have, as it lets you set it for all files, and
then override that value for specific files you care about.


> Wondering out loud, maybe a separate "whitespace" filter is
> the better place for this? That filter could do stuff like:
> * warn about mixed line endings being detected
> * warn about trailing whitespace on end of lines
> * warn about a missing newline at end of file
> * strip trailing whitespace at end of lines
> * replace tabs with spaces or vice versa
> * etc.
> Imagine something like ...
> [name *]
> whitespace = warn-mixed-newlines,trim-trailing-whitespace,expand-tabs
> Ian C.

Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla -


More information about the bazaar mailing list