-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitattributes
More file actions
30 lines (27 loc) · 1.08 KB
/
Copy path.gitattributes
File metadata and controls
30 lines (27 loc) · 1.08 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
# In .gitattributes the LAST matching rule wins. That is why the general rule
# comes first and the testdata/ exception comes last. Inverting the order lets
# `*` override `testdata/**` and Git normalises the corpus.
# General rule for the repository's own code.
* text=auto eol=lf
*.rs text eol=lf
*.ts text eol=lf
*.tsx text eol=lf
*.json text eol=lf
*.toml text eol=lf
*.md text eol=lf
*.html text eol=lf
*.css text eol=lf
# ---------------------------------------------------------------------------
# CRITICAL FOR THIS PROJECT
#
# The test corpus must be preserved byte for byte. Git normalises line endings
# by default, which would turn CRLF into LF on commit and destroy the parser's
# round-trip guarantee: 698 of 725 files are CRLF and 557 do not end in a
# newline.
#
# `-text` disables every EOL conversion. `-diff` treats them as binary in
# diffs, which also avoids useless thousand-line diffs.
#
# This rule must stay last in the file. Do not move it.
# ---------------------------------------------------------------------------
testdata/** -text -diff