Skip to content

Commit b79a74e

Browse files
committed
Update Git line ending settings
Copied from MMF2Exts repo.
1 parent 531bddb commit b79a74e

File tree

2 files changed

+37
-10
lines changed

2 files changed

+37
-10
lines changed

.editorconfig

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
root = true
2+
# Don't forget to update the gitattributes if you're changing line ending treatment
23

3-
[*.{c,cc,cpp,h,hh,hpp}]
4+
[*.{c,cc,cpp,h,hh,hpp,txt,props}]
45
end_of_line = lf
56
insert_final_newline = true
67
charset = utf-8
@@ -15,3 +16,19 @@ charset = utf-8
1516
indent_style = tab
1617
indent_size = 4
1718
trim_trailing_whitespace = false
19+
20+
[*.{json}]
21+
end_of_line = lf
22+
insert_final_newline = true
23+
charset = latin1
24+
indent_style = tab
25+
indent_size = 4
26+
trim_trailing_whitespace = true
27+
28+
[*.{rc,htm,html}]
29+
end_of_line = crlf
30+
insert_final_newline = true
31+
charset = latin1
32+
indent_style = tab
33+
indent_size = 4
34+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
1-
*.c text=auto eol=lf
2-
*.cc text=auto eol=lf
3-
*.cpp text=auto eol=lf
4-
*.cxx text=auto eol=lf
5-
*.h text=auto eol=lf
6-
*.hh text=auto eol=lf
7-
*.hpp text=auto eol=lf
8-
*.hxx text=auto eol=lf
9-
*.md text=auto eol=lf
1+
# From the editorconfig
2+
*.c text eol=lf
3+
*.cc text eol=lf
4+
*.cpp text eol=lf
5+
*.cxx text eol=lf
6+
*.h text eol=lf
7+
*.hh text eol=lf
8+
*.hpp text eol=lf
9+
*.hxx text eol=lf
10+
*.txt text eol=lf
11+
*.md text eol=lf
12+
*.js text eol=lf
13+
*.json text eol=lf
14+
*.rc text eol=crlf
15+
*.htm text eol=crlf
16+
*.html text eol=crlf
17+
18+
*.vcxproj text=auto merge=union
19+
*.sln text=auto eol=crlf merge=union

0 commit comments

Comments
 (0)