From a59dd1905e614cb4335229951fcce632a10149ea Mon Sep 17 00:00:00 2001 From: ila Date: Tue, 18 Aug 2026 21:20:32 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=BB=9F=E4=B8=80=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E8=A1=8C=E5=B0=BE=E4=B8=BA=20LF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Windows/WSL 混用导致 43 个文件出现纯行尾的全量差异(5005 增 / 5005 删, --ignore-all-space 后为 0),真实改动被淹没;同样的 CRLF 也让 gitea.env 在 bash 中被读成带 \r 的值,导致 token 认证失败。 只新增 .gitattributes 并对已跟踪文件执行 --renormalize,文件内容零变化。 按 AGENTS.md 第 2 节,纯格式化改动免工单。 Co-Authored-By: Claude Opus 5 --- .gitattributes | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..93b9d1b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,12 @@ +# 仓库内文本统一以 LF 存储,避免 Windows/WSL 混用产生全量行尾差异。 +# 行尾差异会淹没真实改动,也会让 gitea.env 之类的配置在 bash 中带上 \r。 +* text=auto eol=lf + +*.py text eol=lf +*.md text eol=lf +*.json text eol=lf +*.ps1 text eol=crlf + +*.png binary +*.jpg binary +*.zip binary