Skip to content

Commit f99d8fa

Browse files
alonblDavid Sommerseth
authored and
David Sommerseth
committed
cleanup: add .gitattributes to control eol style explicitly
Having the text auto detection is a risk, as the detection may detect text files that are not text and vise versa. Having global setting will create confusion and differentiate between users. So this patch also move this to local repository. Having git to check out files differently in different OS is also a not correct, as checkouts may be used in shares or in *NIX emulation environments, so it have no effect. Another issue is packaging, if we change out the tree differently in several OSes, we may have different package content, which is something that should be avoided. Currently any editor of MS supports LF end of lines, so there is no need to convert source files while checking out. The visual studio files should be stored as CRLF as they are generated by visual studio every save, in a way that CRLF are added. I handled only the files that may be touch by MS users. Signed-off-by: Alon Bar-Lev <[email protected]> Acked-by: Fabian Knittel <[email protected]> Signed-off-by: David Sommerseth <[email protected]>
1 parent a2d747b commit f99d8fa

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*.c eol=lf
2+
*.h eol=lf
3+
*.rc eol=lf
4+
*.txt eol=lf
5+
*.bat eol=lf
6+
*.vc*proj* eol=crlf
7+
*.sln eol=crlf

Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ dist_doc_DATA = \
5252

5353
dist_noinst_DATA = \
5454
.gitignore \
55+
.gitattributes \
5556
PORTS \
5657
README.IPv6 TODO.IPv6 \
5758
README.polarssl \

0 commit comments

Comments
 (0)