Hi,
I just put up a diff to opt the Path module into git's newline optimization feature: https://github.com/FreeCAD/FreeCAD/pull/3506
This will effectively normalize newlines to internally use Unix LF throughout, but lets git checkouts use CRLF (DOS) line endings when that is the user / platform preference, for example on Windows. Newlines are normalized transparently on commit, so you can use DOS newlines for development, but your diffs will still contain Unix newlines.
The main benefit of this change is to avoid spurious diffs and conflicts from inadvertent newline changes. Avoiding such inadvertent changes can be difficult, especially when existing files use a mix of DOS and Unix newlines within the same file.
The biggest downside is the potential for conflicts with diffs that are outstanding right now. Git might help fix this up by applying auto-normalization on rebase, but there is potential for this to make the rebase more annoying.
Thanks to @vocx-fc for pointing me to the existing .gitattributes normalization setup.
Thoughts?
Gabriel
Dev: Opting the Path module into git newline normalization
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!