Repository navigation
Conversation
Signed-off-by: xumian520 <[email protected]>
Signed-off-by: xumian520 <[email protected]>
Signed-off-by: xumian520 <[email protected]>
|
Thank you for the contribution and for adding a regression contract around LF shell entrypoints on Windows checkouts. This is now triaged as a high-priority Windows build bug for |
|
Thank you — this is a good fit and I would like to merge it. Three small things first, and one of them is our fault rather than yours. What I verified: the 1. Needs a rebase (ours). 2. Assert the loop saw something. If 3. Optional, your call: the test asserts the attribute, not the bytes. A CRLF blob committed before renormalisation would still pass. Grepping the blobs for a literal CR would close that, but the attribute check is the important half and I would not block on it. On cost, since this touches every test leg: it adds one cheap deterministic check to step 0 — negligible runtime, no flake surface, no change to trigger scope. That is the right kind of contract to add. |
|
Reviewed alongside #1314, which fixes the same class of bug — and yours is the one we want to take. It needs a rebase first. Why yours. Both PRs carry the identical core line (
The implementation is clean: pure git plumbing, no dependencies, and the NUL-delimited What is needed: a rebase.
Three smaller things while you are in there, none blocking:
Rebase and ping me; I would like to land this. For the record, I have told @mlandolfi90 on #1314 that yours is the superset we intend to take, and credited them properly — their bug report is what made this concrete, with the exact failure signature from a real fresh Windows clone. |
|
Update on the line-endings pair: your diagnosis was first and your version is the superset (hook files + the contract test), but this branch's conflict (scripts/test.sh step numbering — main now runs steps 0a–0s) left it unmergeable while the minimal .gitattributes rule was needed now, so #1314's four-line core just landed. Rather than ask you to rebase for the remainder, we're distilling your two hook-file entries and the shell-line-endings contract test on top, with Co-Authored-By credit — the close that follows will cite the distilled commit. Thank you for finding this and for building the guard that keeps it fixed; the test is the part that outlives both PRs. |
…uard The *.sh eol=lf rule landed via #1314, but the git hooks (scripts/git-hooks/commit-msg, scripts/hooks/pre-commit) are extensionless and were still at the mercy of core.autocrlf. Add their explicit entries, plus the contract test from #1272 wired as scripts/test.sh Step 0t: every shell entrypoint (*.sh + both hook directories) must carry an eol=lf attribute, with a matched-zero-files guard so a broken glob can never pass vacuously. Distilled from #1272: the diagnosis (CRLF checkouts breaking shebangs under WSL/MSYS), the hook-file coverage, and the guard design are @xumian520's; verified RED without the *.sh rule (105 uncovered entrypoints) and green with it (107 files). Co-Authored-By: xumian520 <[email protected]> Signed-off-by: Martin Vogel <[email protected]>
|
Thank you for this — you found a real Windows checkout breakage (extensionless git hooks losing their LF line endings under core.autocrlf, producing the classic |
What does this PR do?
Preserve LF checkout semantics for shell entrypoints so Windows clones with
core.autocrlf=truecan run repository scripts directly from WSL or MSYS. Without this rule, the shebang can be checked out as CRLF and fail withenv: $'bash\r': No such file or directory.This adds a shell line-ending contract test and runs it before the compiler-heavy suite. The test checks all tracked
*.shfiles and shell hook entrypoints withgit check-attr.Validation
bash tests/test_shell_line_endings.sh: 60/60 entrypoints passedbash scripts/build.sh: passedcodebase-memory-mcp devgit diff --check: passedChecklist
git commit -s) — required, CI rejects unsigned commits (DCO, see CONTRIBUTING.md)make -f Makefile.cbm test)make -f Makefile.cbm lint-ci)