Skip to content

chore: #905 pin *.py eol=lf + renormalize CRLF-committed probe script - #907

Merged
caomengxuan666 merged 1 commit into
masterfrom
arookieofc/fix-905-gitattributes-py
Oct 20, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
arookieofc/fix-905-gitattributes-py

Conversation

@arookieofc

Copy link
Copy Markdown
Member

Closes #905. .gitattributes gains *.py eol=lf next to .sh/.rs. scripts/audit/nested-context-probes.py had 129 CRLFs committed in its HEAD blob (autocrlf smudge without any *.py rule); renormalized, staged diff is 129+/129- and empty under --ignore-cr-at-eol so pure line-ending convergence. Scoped to that one file on purpose: a bare renormalize staged ~750 unrelated files (pre-existing CRLF worktree smudge across vendored trees, exposed by the index touch) - reset back, only these 2 files ship. third_party/oil *.py untouched (vendored ownership); the new rule still pins their future checkouts. Verified no repo .py references CR bytes.

- .gitattributes gains *.py eol=lf next to *.sh/*.rs (core.autocrlf smudge
  otherwise re-CRLFs .py on checkout; scripts/journey probes and
  scripts/audit/nested-context-probes.py drifted, HEAD blob itself carried
  129 CRLFs)
- renormalize scoped to scripts/audit/nested-context-probes.py only:
  staged diff is 129+/129- and empty under --ignore-cr-at-eol, i.e. pure
  line-ending convergence, no content change
- third_party/oil *.py left untouched (vendored tree, separate ownership);
  the new rule still pins their future checkouts to LF
- verified no repo .py references CR bytes (no CRLF dependence)
@github-actions

Copy link
Copy Markdown
Contributor

欢迎!这是你的第一个 PR 🎉 请确认已跑过本地测试套件;CI 通过后维护者会 review。

@caomengxuan666

Copy link
Copy Markdown
Member

评审结论:APPROVE(Ready to merge)

审阅提交:ed13b7a7

核验项

  1. .gitattributes 规则(line 9):
    • 在 *.sh eol=lf 与 *.rs eol=lf 旁补齐 *.py eol=lf,防止 core.autocrlf=true 在 Windows 检出时将 Python 探针/驱动脚本重写为 CRLF。
  2. 索引行尾收敛(scripts/audit/nested-context-probes.py):
    • 核查全仓 git ls-files --eol -- "*.py" "**/*.py"(共 12 个受管 .py 文件),scripts/audit/nested-context-probes.py 是唯一索引 blob 为 i/crlf 的 Python 脚本(其余 11 个包含 third_party/oil/test/*.py 在索引中均已为 i/lf)。
    • 该文件 129+/129- 为纯 CRLF→LF 行尾归一化,零实质内容改动,收敛范围精准。
  3. CI 与合并状态:6 项检查全绿,与 origin/master 无冲突(mergeable: true)。

@caomengxuan666
caomengxuan666 merged commit baee5a9 into master Oct 20, 2026
8 checks passed
@caomengxuan666
caomengxuan666 deleted the arookieofc/fix-905-gitattributes-py branch October 21, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.gitattributes 未钉 *.py 致 journey 驱动脚本全文 CRLF 漂移(多轮 CR 评审噪音源)——#904 CR 观察

2 participants