The pre-commit hook is executable #408

Closed
github-bot wants to merge 0 commits from github-bot/gh-408 into main AGit
Owner

@⁠ColorMeBoom on GitHub · 2026-12-01 22:53 UTC · original
ColorMeBoom:fix/executable-pre-commit-hook → main · +0 −0 · 1 files · 72 commits · closed without merging

.githooks/pre-commit was stored as mode 100644. Git runs a hook only when its file is executable, so on Linux and macOS cargo xtask install-hooks sets core.hooksPath but every commit skips the asset-policy check. The only sign is a hint:

hint: The '.githooks/pre-commit' hook was ignored because it's not set as executable.

This PR only changes the file's mode to 100755. The content is the same, and Windows is unaffected.

Tested on Linux (git, CachyOS):

  • Before: with the file at 100644, I force-added a dummy data.bin. The commit went through and the hook never ran.
  • After: with the file at 100755, the same commit is rejected with POLICY: data.bin: file type not on the allowlist, and normal commits pass (asset policy: 1 files ok).

🤖 Generated with Claude Code

**@⁠ColorMeBoom** on GitHub · 2026-12-01 22:53 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/408) `ColorMeBoom:fix/executable-pre-commit-hook` → `main` · +0 −0 · 1 files · 72 commits · closed without merging `.githooks/pre-commit` was stored as mode 100644. Git runs a hook only when its file is executable, so on Linux and macOS `cargo xtask install-hooks` sets `core.hooksPath` but every commit skips the asset-policy check. The only sign is a hint: ``` hint: The '.githooks/pre-commit' hook was ignored because it's not set as executable. ``` This PR only changes the file's mode to 100755. The content is the same, and Windows is unaffected. **Tested on Linux (git, CachyOS):** - **Before:** with the file at 100644, I force-added a dummy `data.bin`. The commit went through and the hook never ran. - **After:** with the file at 100755, the same commit is rejected with `POLICY: data.bin: file type not on the allowlist`, and normal commits pass (`asset policy: 1 files ok`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Git runs a hook only when its file has the executable bit. The hook was
stored as 100644, so on Linux and macOS `cargo xtask install-hooks` set
core.hooksPath but every commit skipped the asset-policy check, with only
a hint that the hook was ignored. Stored as 100755 now; Windows is
unaffected.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 22:53:56 +00:00
github-bot closed this pull request 2026-12-02 07:54:19 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.