Skip to content

fix: restore the executable bit on the git hook scripts - #159

Merged
FredM67 merged 1 commit into
devfrom
fix/script-exec-bits
Sep 23, 2026
Merged

FredM67 merged 1 commit into
devfrom
fix/script-exec-bits

Conversation

@FredM67

@FredM67 FredM67 commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Problem

scripts/git-hooks/pre-commit and scripts/hooks/update-metadata.sh are both committed as mode 100644.

Git will not run a hook that is not executable — it skips it without a word. So on Linux and macOS, scripts/install-hooks.sh installs a pre-commit hook that silently never fires: no clang-format check, no @date/@copyright stamping. Windows does not honour the POSIX permission bit, which is why nobody noticed.

The bit was present on chore/metadata-hook (100755) and got lost when #153 was squashed into dev.

Change

Mode change only, zero content change:

mode change 100644 => 100755 scripts/git-hooks/pre-commit
mode change 100644 => 100755 scripts/hooks/update-metadata.sh

scripts/install-hooks.bat deliberately stays 100644 — it is invoked through cmd, never exec'd. Every other script in the repo (formatter.sh, scripts/install-hooks.sh, Mk2_3phase_RFdatalog_temp/scripts/tune_cloud_immunity.sh) is already 100755.

Verification

$ git ls-tree -r HEAD -- scripts
100644 blob ...    scripts/README.md
100755 blob ...    scripts/git-hooks/pre-commit
100755 blob ...    scripts/hooks/update-metadata.sh
100644 blob ...    scripts/install-hooks.bat
100755 blob ...    scripts/install-hooks.sh

No firmware source is touched, so builds and tests are unaffected.

🤖 Generated with Claude Code

`scripts/git-hooks/pre-commit` and `scripts/hooks/update-metadata.sh` were
committed as 100644. Git refuses to run a hook that is not executable, so
`scripts/install-hooks.sh` installs a pre-commit hook that silently never
fires on Linux and macOS. Windows is unaffected, which is why this went
unnoticed.

Mode change only, no content change. `install-hooks.bat` stays 100644 --
it is invoked through cmd, not exec'd.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@FredM67
FredM67 merged commit 1ecebcb into dev Sep 23, 2026
32 checks passed
@FredM67
FredM67 deleted the fix/script-exec-bits branch September 23, 2026 12:12
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.

1 participant