Skip to content

enforce project EOL to be correct regardless of user GIT settings #76

Closed

Description

@McFoggy

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.

Activity

  1. mathieucarbou commented on Apr 16, 2015

    @mathieucarbou
    Owner

    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.

  2. mathieucarbou commented on Apr 16, 2015

    @mathieucarbou
    Owner

    I'll add that there is a way to modify this property at a project level by editing the file .git/config.

  3. McFoggy commented on Apr 16, 2015

    @McFoggy
    ContributorAuthor

    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.

  4. McFoggy commented on Apr 16, 2015

    @McFoggy
    ContributorAuthor

    I'll add that there is a way to modify this property at a project level by editing the file .git/config

    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.

  5. mathieucarbou commented on Apr 16, 2015

    @mathieucarbou
    Owner

    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 ;-)

  6. added 3 commits that reference this issue on Feb 1, 2016
    6a4394e
    1525257
    e56a5bb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions