Skip to content

Commit c92f4a6

Browse files
chore(commit-msg): Do Not Encourage Use of --no-verify
1 parent 3e603a0 commit c92f4a6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.githooks/commit-msg

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# - On retry, if M40LLM_COMMIT_NONCE matches the computed nonce for the current staged
1212
# diff and message, allow the commit without interaction.
1313

14-
set -u
14+
set -uuo pipefail
1515
MSG_FILE="$1"
1616

1717
# 1) Reject literal \n sequences
@@ -67,6 +67,8 @@ echo "[commit-msg] 1) Does the commit message properly represent what changed A
6767
echo "[commit-msg] 2) Does it have the correct Conventional Commits type for what changed?" >&2
6868
echo "[commit-msg] If either answer is NO: revise the commit message (and/or type) and try 'git commit' again. A new nonce will be shown for the revised message." >&2
6969
echo "[commit-msg] Only if BOTH answers are YES, finalize the commit by re-running with the nonce, for example:" >&2
70-
echo " M40LLM_COMMIT_NONCE=$nonce git commit -F $MSG_FILE --no-verify" >&2
70+
echo " M40LLM_COMMIT_NONCE=$nonce git commit -F $MSG_FILE" >&2
71+
echo
72+
echo "[commit-msg] Your commit message was saved to $MSG_FILE"
7173
# Note: users using 'git commit' interactively can re-run with -m or -F and the nonce set.
7274
exit 1

0 commit comments

Comments
 (0)