Skip to content
  • Johannes Schindelin's avatar
    Fix build with core.autocrlf=true · 00ddc9d1
    Johannes Schindelin authored and Junio C Hamano's avatar Junio C Hamano committed
    On Windows, the default line endings are denoted by a Carriage Return
    byte followed by a Line Feed byte, while Linux and MacOSX use a single
    Line Feed byte to denote a line ending.
    
    To help with this situation, Git introduced several mechanisms over the
    last decade, most prominently the `core.autocrlf` setting.
    
    Sometimes, however, a single setting is incorrect, e.g. when certain
    files in the source code are to be consumed by software that can handle
    only LF line endings, while other files can use whatever is appropriate
    for the current platform.
    
    To allow for that, Git added the `eol` option to its .gitattributes
    handling, expecting every user of Git to mark their source code
    appropriately.
    
    Bash assumes that line-endings of scripts are denoted by a single Line
    Feed byte. Therefore, shell scripts in Git's source code are one example
    where that `eol=lf` option is *required*.
    
    When generating common-cmds.h, the Unix tools we use generally operate on
    the assumption that inp...
    00ddc9d1