Hooks: track pre-commit as executable so the policy check runs on Linux #253
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!253
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/253/head"
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?
@SkippySteve on GitHub · 2026-11-24 01:50 UTC · original
SkippySteve/victory-pr-own-next6→main· +27 −0 · 2 files · 1 commits · closed without merging.githooks/pre-commitis tracked as100644. Git outside Windows skips a hook that is not executable and only prints a hint, so aftercargo xtask install-hooksa commit on Linux or macOS never runscargo xtask policy --staged:Git for Windows runs hooks regardless of the bit, so nothing changes there.
.githooks/pre-commitas100755(mode change only, contents unchanged).hooks_are_tracked_executableto xtask: it readsgit ls-files --stage -- .githooksand fails if a tracked hook is not100755(it skips itself outside a git checkout).Testing on Linux:
cargo test -p xtask: passes; with the bit flipped back viagit update-index --chmod=-xthe new test fails, naming the hook.cargo clippy -p xtask --all-targets -- -D warningsandcargo fmt --check: clean.core.hooksPath=.githooksnow runs the policy check on commit instead of printing the hint.@SkippySteve on GitHub · 2026-11-24 02:28 UTC · original
Superseded by #246, which now includes this change (rebased onto main, with its test).
Pull request closed