返回 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 # Generated pet native artifacts are regenerated in memory and compared byte
18 # for byte by `npm --prefix pet run check` (pet/scripts/build-pet.mjs), and the
19 # TUI copy is embedded with include_str!() (pet_watch/owner.rs). The generator
20 # emits LF, so a CRLF Windows checkout reported all three as stale and would
21 # embed different bytes.
22 crates/tui/src/tui/pet_watch/pet-native.js text eol=lf
23 pet/ios/Resources/pet-native.js text eol=lf
24 pet/ios/Resources/demo.jsonl text eol=lf
25 # Tideline component goldens (crates/tui/src/tui/goldens/*.txt) are
26 # fs::read_to_string'd and compared byte for byte against buffer dumps that
27 # always join rows with LF (golden_harness.rs::render_golden_text), so a
28 # CRLF checkout failed all eight Windows golden tests with a pure \r\n diff.
29 crates/tui/src/tui/goldens/*.txt text eol=lf
30 # FEAT-025 baseline export goldens (crates/tui/src/commands/fixtures/*.md) are
31 # include_str!()'d and compared byte for byte against a document the exporter
32 # builds with LF, so a CRLF checkout failed the four Windows golden tests with a
33 # pure \r\n diff (Windows CI caught this; Linux cannot see it).
34 crates/tui/src/commands/fixtures/*.md text eol=lf
35 # FEAT-029 debug diagnostics baselines (crates/tui/src/commands/fixtures/
36 # diagnostics/*) are compared byte for byte against command output joined
37 # with LF, so a CRLF checkout failed every Windows baseline parity test with a
38 # pure \r\n diff.
39 crates/tui/src/commands/fixtures/diagnostics/* text eol=lf
40 # Conformance fixtures are recorded wire bytes (SSE framing is line-exact) and
41 # goldens compared byte for byte; a CRLF checkout must not rewrite either.
42 crates/tui/tests/fixtures/conformance/** text eol=lf
43 crates/*/assets/**/*.json text eol=lf
44 crates/*/assets/**/*.md text eol=lf
45 crates/*/locales/*.json text eol=lf
46 workflows/*.js text eol=lf
47 # Executable documentation: the Fleet tutorial's JSON fence is parsed by the
48 # task-spec contract test, so its bytes must agree on Windows and Unix.
49 docs/FLEET_WORKFLOW_TUTORIAL.md text eol=lf
50 # The dsh bundle scene is include_str!() into the generated client.js and
51 # hashed for stale detection; CRLF would change both across platforms.
52 crates/tui/src/integrations/dsh/*.js text eol=lf
53 # The native DSH import fixture bundle is hashed into the conversion receipt,
54 # so a CRLF checkout changed the expected digest on Windows.
55 scripts/fixtures/dsh-web-app/** text eol=lf
56
57 # The extension host's generated protocol TS is compared byte for byte with
58 # the generator's LF output (protocol/tests.rs), and its dist bundle is
59 # include_bytes!()'d and digest-checked at launch; a CRLF Windows checkout
60 # failed the former and would embed different bytes.
61 crates/tui/extension-host/src/protocol.generated.ts text eol=lf
62 crates/tui/extension-host/dist/** text eol=lf
63 # Reviewed extension-host fixtures carry exact source SHA-256 receipts.
64 # A Windows checkout must not rewrite their admitted source closure to CRLF.
65 crates/tui/tests/fixtures/extension_host/** text eol=lf
66
67 # Rustfmt writes LF; keep Rust sources stable across Windows/Linux/macOS.
68 *.rs text eol=lf
69
70 # Release shell scripts are invoked directly by bash on Windows
71 # checkouts; CRLF turns `set -euo pipefail` into an invalid option.
72 scripts/release/*.sh text eol=lf
73
74 # Keep repository attributes themselves stable on every platform.
75 .gitattributes text eol=lf
76
77 # Everything else auto-detects (default).
78 * text=auto
79
80 # Preserve the qualified upstream font license, including its trailing space.
81 web/public/brand/fonts/OFL.txt text eol=lf whitespace=-blank-at-eol
82
82 lines Plain Text