build: point the build-rev test's hooksPath at an empty folder #2355
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2363"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-25T13:40:48Z.
Change
tests/startup_build_rev_check.pyruns every git command with-c core.hooksPath=so a contributor's hooks cannot run in its temporary repositories. Some git builds reject the empty value and the check fails before it tests anything:The check now points
core.hooksPathat an empty folder inside its temporary directory, which disables hooks the same way on any git. This is an independent build fix; no issue tracks it.Verification
On
fe0c822f+ this commit, Windows 11 (26200), git 2.47.2.vfs.0.1:ctest --preset dev --no-tests=error -R '^startup_build_rev_controls$': 1 passed.git -c core.hooksPath= rev-parse HEADfails the same way outside the test.Evidence and follow-up
Measured on one git build only (the VFS fork). I have not checked which upstream git versions reject the empty value; CI's git accepts it, so CI cannot reproduce the failure. No new fixture.
Checklist
This change was AI-assisted: written with Claude Code, and the checks above were run locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T13:45:05Z.
Review: COMMENTED
Review of head
dfda9f53b5cfa06d6369438308175fb73331613d(one file:tests/startup_build_rev_check.py, +4/-1).Result: 0 P1, 0 P2.
Logic:
core.hooksPath=is replaced by a path to an emptyno-hooksfolder inside the test's temp dir. Git then finds no hooks in it, so contributor hooks stay disabled, and no git build sees an empty-string path. The folder is created before any git call, andas_posix()keeps the value valid on Windows. No otherhooksPathuse or sibling check needs the same change. No competing PR touches this file.Commands run locally (Linux, git 2.47.3), in a worktree at the head above:
python3 tests/startup_build_rev_check.py->startup_build_rev_check: 10 cases okpython3 tests/docs_links_check.py->Checked 18 Markdown files and 451 links.python3 tests/bidi_controls_check.py->no bidirectional controls.git diff --check origin/main...HEAD-> cleanMutation check:
pre-commithook into the newno-hooksfolder ->FAIL git commit -q -m first ..., exit 1. This shows the newhooksPathvalue is really honored by every git call in the test.core.hooksPath=still passes here. That is expected: this git accepts the empty value. The PR body says the same, so only some git builds reproduce the old failure.CI at this head:
Build and test on Windowspass,Run platform-independent Python checks on Linuxpass,Assemble and translate gfx1013 fixturespass.Only a
.pytest changed, so the pure-Python fast path applies.AI-assisted; commands listed were executed locally.