Skip to content

Add .gitattributes #110

@mgaffigan

Description

@mgaffigan

If I'm missing something here, please say so, but it seems like there's not much consistency on whether the repo uses CRLF or whether it uses LF. Most projects specify a .gitattributes to ensure the repo is stored in LF, and each contributor ends up with an appropriate EOL according to their system preference.

I don't think anything is broken with the status quo per-se, and to fix this would be a huge commit, but it is likely worth doing at some point.

A minimal (still acceptable) .gitattributes would just be * text=auto, then run git add --normalize .

Here's the top file extensions and their formats as of today (output of git ls-files --eol):

Extension i/crlf i/lf i/mixed i/none i/-text Grand Total
.xml 6267 136 0 0 0 6403
.java 569 1223 4 0 1 1797
.jar 0 0 0 0 455 455
.png 0 0 0 0 113 113
.sql 44 53 0 11 0 108
.form 0 62 0 0 0 62
.js 3 38 0 2 0 43
.txt 19 14 1 5 0 39
.properties 11 7 0 0 0 18
.css 4 11 0 3 0 18
.hl7 0 14 0 0 1 15
.md 0 9 0 0 0 9
.classpath 3 4 1 0 0 8
.project 7 1 0 0 0 8
.vmoptions 0 5 0 0 0 5
.tld 0 5 0 0 0 5

Full table.

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