Last day to vote/reject on proposed EOL names

Ian Clatworthy ian.clatworthy at internode.on.net
Tue Mar 31 16:21:18 BST 2009


Ben Finney wrote:
> Eric Siegerman <lists08-bzr at davor.org> writes:
> 
>> How about splitting the two config items into separate
>> properties?  E.g., what you have as "native:crlf" would instead
>> be something like:
>>     [...]
>>     eof = native
>>     repo-eof = crlf
>>
>> and one (presumably) common configuration for Windows developers
>> working on cross-platform projects would be:
>>     [...]
>>     eof = crlf
>>     repo-eof = lf
> 
> (Assuming that these names should say ‘eol’, not ‘eof’, throughout
> your message.)
> 
> I shouldn't presume that I get a vote, but: +1 on the idea of separate
> config options for the distinct concepts.
> 
> The names might be better, though, if it was clear that *neither* of
> them is the one true EOL setting. One for the working tree, one for
> the repository: ‘tree-eol’, ‘repo-eol’, perhaps.
> 

Hmmm. This is an interesting idea and I was just about to implement it.
My problem is that I can't see how to make it work technically, with
the content filtering architecture at least, if not semantically.

Apologies if I'm too deep inside here to see the forest for the trees.
Ask yourself this question: what filtering happens for each value of
each setting? And is it safe to do the filtering for each combination?

To be safe, the default for tree-eol must be 'exact'. So if the
default for repo-eol is 'lf' as proposed, then:

* checkout will do no transformation but commit will convert
  things (crlf to lf).

That will break binary files. So, let's make the default for repo-eol
'exact' as well. Then, if tree-eol=native and repo-eol isn't set:

* checkout will convert to crlf on windows & commit will do no
  transformation, breaking files stored with lf as their eol.

So my point is this: content filters are a read/write pair and
these pairs need to DTRT. I can't see how they can if we're using
tree-eol to set the write filter and repo-eol to set the read filter.

Now it's late here so I might be brain dead without realising it.
If that's the case, someone please explain why I'm wrong.

Ian C.



More information about the bazaar mailing list