my strategy on implementing line-endings (eol) support

Martin Pool mbp at canonical.com
Tue Apr 15 08:07:33 BST 2008


2008/4/14 Alexander Belchenko <bialix at ukr.net>:
> Robert Collins пишет:

> http://bazaar-vcs.org/SprintLondonMarch08/Brainstorms#head-f6668b591465639502e563d4321d1a28fd7f0b10
> is the notes from the sprint.
> >
>
>  I read those notes several times, and in some aspects my work followed
> them, but in some
>  is not. I think some points unclear or probably overcomplicated. At least I
> can't follow them
>  directly all the time.

They are pretty terse, but at least it can prompt the memory of people
who were there.

I'm late to posting in this thread too, but I also want to say I'm
really happy you're working on this.

>  Just to be sure we are talking about the same things here is my comments on
> that notes.
>
>  >== Line Endings ==
>  >
>  > * trivial changes resulting in entire file diffs. Hard to read, blows up
> repository size, invalidates sha1 caching in >dirstate.
>
>  I suppose you were talking about mangling of line-endings in working tree.
> Completely agree.
>  This is main problem I wanna to solve.

This is referring, beyond the obvious issue of showing the right diff
to the user, to the problems that would occur if we always just
committed what was in the tree.  I believe this is what svn does, or
did, and it has the advantage that you can always reproduce
byte-for-byte what was stored in the workingtree, which potentially
lets you recover if people commit with the wrong eol settings.  I used
to support that approach.  But it does mean that the whole file will
commonly flip from one encoding to the other, making the repository
needlessly very big.

>  >     * could also do things like keyword expansion
>
>  Could, but I don't want to implement it right now. Keywords expansion is
> often asked
>  but I personally don't like it. I still had bad feelings of it back to time
>  when I used CVS.

I think the point is to make the extensions to the tree interface not
specific to EOLs, but allowing arbitrary text changes, and also to do
the configuration of it in a open way.

-- 
Martin <http://launchpad.net/~mbp/>


More information about the bazaar mailing list