-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy path.gitattributes
More file actions
95 lines (84 loc) · 3.3 KB
/
Copy path.gitattributes
File metadata and controls
95 lines (84 loc) · 3.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# ============================================================================
# Line-ending and whitespace attributes
#
# Goal: keep source/text files normalized so that replacing a file with a
# copy that only differs in CRLF/LF does NOT show up as a whole-file diff.
# This defines behaviour going forward only; no mass renormalization is done.
# ============================================================================
# Let Git handle text detection and normalize text to LF in the repository.
* text=auto
# ----------------------------------------------------------------------------
# C/C++ source -> stored and checked out as LF
# ----------------------------------------------------------------------------
*.c text eol=lf
*.cc text eol=lf
*.cpp text eol=lf
*.cxx text eol=lf
*.h text eol=lf
*.hpp text eol=lf
*.hxx text eol=lf
*.inl text eol=lf
# Generated revision headers must stay LF
src/shared/revision_nr.h text eol=lf
src/shared/revision_sql.h text eol=lf
# ----------------------------------------------------------------------------
# CMake, config and other text files -> LF
# ----------------------------------------------------------------------------
CMakeLists.txt text eol=lf
*.cmake text eol=lf
*.sql text eol=lf
*.txt text eol=lf
*.md text eol=lf
*.xml text eol=lf
*.conf text eol=lf
*.dist text eol=lf
*.json text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
# ----------------------------------------------------------------------------
# Unix shell scripts -> LF
# ----------------------------------------------------------------------------
*.sh text eol=lf
# ----------------------------------------------------------------------------
# Windows scripts and Visual Studio project files -> CRLF
# ----------------------------------------------------------------------------
*.sln text eol=crlf
*.vcproj text eol=crlf
*.vcxproj* text eol=crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
# ----------------------------------------------------------------------------
# Binary / runtime artifacts -> never normalize
# ----------------------------------------------------------------------------
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.bmp binary
*.mpq binary
*.dbc binary
*.db2 binary
*.map binary
*.vmap binary
*.mmap binary
*.lib binary
*.dll binary
*.exe binary
*.pdb binary
*.zip binary
*.7z binary
*.gz binary
*.tar binary
# ============================================================================
# Whitespace rules (preserved from the original .gitattributes)
# ============================================================================
# strict (no trailing, no tabs)
*.cpp whitespace=trailing-space,space-before-tab,tab-in-indent,cr-at-eol
*.h whitespace=trailing-space,space-before-tab,tab-in-indent,cr-at-eol
# normal (no trailing)
*.sql whitespace=trailing-space,space-before-tab,cr-at-eol
*.txt whitespace=trailing-space,space-before-tab,cr-at-eol
# special files which must ignore whitespace
*.patch whitespace=-trailing-space