Alternatives to EOL extension

Harvey Chapman hchapman-hg at 3gfp.com
Thu Jan 15 13:45:19 UTC 2015


> On Jan 14, 2015, at 6:42 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
> 
> Yes - but why introducing it in the repository if the only sane thing to do is to jump through loops to ignore it anyway? Why spend space and thus time and get more churn for something that really doesn't matter?
> 
> A bigger problem than annotate and diff is that mergetools also will have to handle these random changes in line endings. Should the line endings be allowed to change randomly back and forth? Or should there be one well-defined default it just should apply before doing the actual merges? If so: that is pretty much what the eol extension does. It keep things simple by just always keeping it simple.
> 
> I agree it is better if everybody can agree on using tools that do it the same way. But IMO, if you are working cross platform and with different tools (especially MS tools), then you need some kind of tooling to keep things konsistent.

Agreed. At past companies when this was an issue, we inserted an automatic syntax formatter that not only auto corrected line endings, but enforced code style. It made life so much easier in the long run. Even the most diligent coders make mistakes or use an unconfigured editor on a new machine from time to time. It prevented accidental commits of whitespace noise.




More information about the Mercurial mailing list