返回 CodeWhale
.gitattributes
根目录 / .gitattributes
1 # Ensure LF line endings for files consumed by include_str!() on all platforms.
2 # include_str!() preserves raw bytes; CRLF breaks substring assertions and
3 # produces different compiled binaries on Windows vs Linux/macOS.
4 # Cover nested mode/approval/personality prompts — a top-level *.md glob alone
5 # left modes/*.md on CRLF under Windows autocrlf and blew the agent token budget.
6 crates/tui/src/prompts/**/*.md text eol=lf
7 crates/tui/src/prompts/*.md text eol=lf
8 crates/tui/src/prompts/*.txt text eol=lf
9
10 # The rest of the include_str!() inputs. `* text=auto` below converts these to
11 # CRLF on a Windows checkout, which is invisible for the ones that are only
12 # parsed or substring-matched and fatal for the one that is compared byte for
13 # byte: crates/telemetry/tests/golden/v1.json is asserted against
14 # serde_json::to_string_pretty output, which always emits LF, so Windows CI
15 # failed `golden_payload_v1` with a pure \r\n diff.
16 crates/telemetry/tests/golden/*.json text eol=lf
17 crates/*/assets/**/*.json text eol=lf
18 crates/*/assets/**/*.md text eol=lf
19 crates/*/locales/*.json text eol=lf
20 workflows/*.js text eol=lf
21
22 # Rustfmt writes LF; keep Rust sources stable across Windows/Linux/macOS.
23 *.rs text eol=lf
24
25 # Release shell scripts are invoked directly by bash on Windows
26 # checkouts; CRLF turns `set -euo pipefail` into an invalid option.
27 scripts/release/*.sh text eol=lf
28
29 # Keep repository attributes themselves stable on every platform.
30 .gitattributes text eol=lf
31
32 # Everything else auto-detects (default).
33 * text=auto
34
34 lines Plain Text