Skip to content

Cygwin support (aka. support systems with core.autocrlf=true set globally) #2

@DrVanScott

Description

@DrVanScott

Hi,

On windows systems core.autocrlf is normally set to "true" globally. Unfortunately this will render git projects useless which contain bash code, as git is creating those files with CRLF which bash doesn't like. I see four possible solutions:

  • import.bash should do a "git -c core.autocrlf=input clone ..." and finally set core.autocrlf=input locally
  • import.bash should make use of "set -o igncr" (warning: cygwin bash only!) (Not sure if this option really works...)
  • reject this request and force me to use "set -o igncr", e.g. in my .bash_profile. I admitt that this solutions seems to be clean (and easy from your perspective ;-) ), but i am not sure about the consequences of setting igncr globally (Are there shell scripts where CRLF SHOULD matter?)
  • add .gitattributes file to all of your *.bash projects and force git to handle shell scripts eol=lf

In my opinion the first or the last option are preferable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions