You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
enforce project EOL to be correct regardless of user GIT settings #76
We should find a way to enforce some rules at project level so that whatever the default global git configuration of a user is, the project works as expected.
Today (commit dbc060a5297228055ce791ad2af4027da6e37a95), if you are on a windows machine and you applied different GIT recommandations (GIT SCM book, Github documentation) by setting git config --global core.autocrlf true
then the project does not build correctly: tests in UpdateMojoTest & RemoveMojoTest are failing because they rely on specific \n line ending.
At least we should investigate if we could not enforce, using git functionnalities, project specific rules that would override user settings.
As I already said, core.autocrlf should NEVER be true for the simple reason that it is a host-specific config which modify project files.
If prject files are modified, it is a NORMAL behavior for tests to fail.
GIT introduced this flag so that it is easy to work in a project with different EOL systems. This is not the role of a SCM to fix that, but much for a role of the IDEs and developers.
If you already used Subversion, CVS and others you used to handle these EOL at a project level as you say, from your IDE.
I do not understand why you are closing this directly without letting anyone including me to lookup & provide a way to make this transparent?
From what I see on projects where EOL characters matter, they provide PROJECT SPECIFIC rules via a .gitattributes file.
If there is a way to do this clean, why do you refuse to at least investigate it?
Please reconsider reopening the issue until a real analysis of existing possibilities is done.
Sorry! yes it should not be closed! I misunderstood the issue description. If here is some way to set the autocrlf setting specifically for a project, yes it would do the trick.
I'd like also to avoid placing a .gitattributes file which treat all files as binary ;-)
Activity
mathieucarbou commentedon Apr 16, 2015
As I already said,
core.autocrlfshould NEVER be true for the simple reason that it is a host-specific config which modify project files.If prject files are modified, it is a NORMAL behavior for tests to fail.
GIT introduced this flag so that it is easy to work in a project with different EOL systems. This is not the role of a SCM to fix that, but much for a role of the IDEs and developers.
If you already used Subversion, CVS and others you used to handle these EOL at a project level as you say, from your IDE.
mathieucarbou commentedon Apr 16, 2015
I'll add that there is a way to modify this property at a project level by editing the file
.git/config.McFoggy commentedon Apr 16, 2015
I do not understand why you are closing this directly without letting anyone including me to lookup & provide a way to make this transparent?
From what I see on projects where EOL characters matter, they provide PROJECT SPECIFIC rules via a .gitattributes file.
If there is a way to do this clean, why do you refuse to at least investigate it?
Please reconsider reopening the issue until a real analysis of existing possibilities is done.
McFoggy commentedon Apr 16, 2015
but that means a manual step after checking out the project.
Really I am convinced that if a clean setup is possible then we should try it.
mathieucarbou commentedon Apr 16, 2015
Sorry! yes it should not be closed! I misunderstood the issue description. If here is some way to set the
autocrlfsetting specifically for a project, yes it would do the trick.I'd like also to avoid placing a
.gitattributesfile which treat all files as binary ;-)fixes mathieucarbou#76, add .gitattributes, apply LF normalization
fixes mathieucarbou#76, add .gitattributes, apply LF normalization
fixes mathieucarbou#76, normalization of LF, forced CRLF in .gitattri…