Repository navigation
Expand file tree
/
Copy path.gitattributes
More file actions
57 lines (51 loc) · 2.51 KB
/
Copy path.gitattributes
File metadata and controls
57 lines (51 loc) · 2.51 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
# Ensure shell scripts always use LF so they execute correctly in Linux containers.
*.sh text eol=lf
*.bash text eol=lf
# Dockerfile and CI configs use LF.
Dockerfile text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
# Golden test files use LF
contracts/streaming-payments/test_orderings/*.txt text eol=lf
# Default: auto-normalize everything else.
* text=auto
# -----------------------------------------------------------------------------
# Sources and generated artifacts: LF on every platform.
#
# Three CI gates regenerate a committed file and diff it against the source
# (scripts/check_generated.sh), and two of them hash their inputs into a
# content-derived stamp. On a Windows checkout with core.autocrlf=true those
# files arrive with CRLF while the generators write LF, so a gate can report
# drift that no amount of re-running clears — this repo has already paid for it
# once (see `a3af379`, "normalize CRLF before hashing the schema fingerprint").
# Pinning both sides of each gate to LF makes the working tree byte-identical
# to the index locally and in CI.
#
# *.rs is here because rustfmt emits LF: `cargo fmt --all -- --check` fails a
# CRLF checkout on the contributor's machine in a way `cargo fmt --all` then
# re-cleans, which churns whole files for no reason.
#
# Must come before the `-text` attestation rules below, since the last
# matching pattern wins.
# -----------------------------------------------------------------------------
*.rs text eol=lf
*.md text eol=lf
*.ts text eol=lf
*.tsx text eol=lf
*.mjs text eol=lf
*.json text eol=lf
# *.toml joins the list because two gates read it with line-oriented shell:
# scripts/attest.sh and scripts/reproducible_build.sh grep rust-toolchain.toml
# for the pinned channel and feed the result into a content-derived stamp. On an
# autocrlf checkout that value arrives with a trailing carriage return, which is
# exactly the class of drift the note above exists to prevent, and the files
# otherwise fall under `* text=auto` (LF in the index, CRLF on a Windows
# working tree). *.py is here for the same reason as *.rs: it is a source file
# the CI jobs execute, and it should not depend on the contributor's platform.
*.toml text eol=lf
*.py text eol=lf
# Attestation payloads are signed byte-for-byte, so any line-ending
# normalization would invalidate every signature on a Windows checkout.
# Must come after `* text=auto` above to take effect.
attestations/**/*.json -text
attestations/**/*.sig -text