Skip to content

Fix incorrect comments in pre-commit script - #1403

Merged
zcorpan merged 1 commit into
mozilla:mainfrom
hobostay:fix-precommit-comments
May 19, 2026
Merged

zcorpan merged 1 commit into
mozilla:mainfrom
hobostay:fix-precommit-comments

Conversation

@hobostay

@hobostay hobostay commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

The comments in the pre-commit hook script (lines 5-7) contain two errors:

  1. Line 5: Says .git/hooks/precommit (missing hyphen) — should be .git/hooks/pre-commit
  2. Line 7: Manual install example has wrong source and target paths:
    • Was: ln -s ../../hooks/pre-commit .git/pre-commit
    • Should be: ln -s ../../pre-commit .git/hooks/pre-commit

The actual installation code (lines 20-25) is correct — only the instructional comments were wrong, which could confuse someone trying to manually install the hook.

Test plan

  • Verify the corrected comment paths match the actual code behavior at lines 20-25

🤖 Generated with Claude Code

- Fix symlink path: "precommit" → "pre-commit" (missing hyphen)
- Fix manual install example: source path was wrong
  (was "../../hooks/pre-commit", should be "../../pre-commit")
  and target path was wrong (was ".git/pre-commit", should be
  ".git/hooks/pre-commit")

The actual code at line 20-25 is correct; only the comments were wrong.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@zcorpan
zcorpan merged commit 77d9a77 into mozilla:main May 19, 2026
1 check passed
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.

2 participants