Files
crawler-plugin/.gitattributes
T
huangzd1997 3bd2b60774 build: 把断言会读到的文本钉成 LF,新检出不再被 autocrlf 改写
2026-09-28 在隔离 worktree 跑全量时,ShopDataCrawl/AppearancePatent/PublishBatch
三组快照测试共 6 个失败:golden 文件被检出成 CRLF,而生成串用 append('\n'),
Files.readString 不做归一就整片红(内容与主工作树逐字节一致,去掉 \r 后相等)。
仓库 HEAD 里 0 个文本 blob 含 CR,所以 eol=lf 是零 churn 的钉法:不改现有文件、
不让 git status 变脏,只保证 checkout 形态与 blob 一致。

只列扩展名,不写 `* text`:后者会让 git 去归一化 jar/png/zip 等二进制产物。
2026-09-28 18:59:14 +08:00

13 lines
664 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 仓库内文本 blob 全部是 LF(2026-09-28 取证:git grep -P '\r' 在 HEAD 上 0 命中),
# 但开发机 core.autocrlf=true 会在检出时改写为 CRLF。快照类测试拿 Files.readString 读
# golden 后与代码里 append('\n') 生成的字符串逐字节比对,检出形态一变就整片红。
# 这里把"断言会读到的文本"钉成 LF,checkout 时不再被 autocrlf 转换。
# 只列扩展名、不写 `* text`:避免 git 去归一化 jar/png/zip 等二进制产物。
*.txt text eol=lf
*.md text eol=lf
*.sql text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.json text eol=lf
*.sh text eol=lf