🐛 Fix commit template setup with git config

Copying the template into .git/COMMIT_EDITMSG has no lasting
effect: git pre-fills that file from the commit.template config,
so the script registered nothing and the template never appeared.
Use git's own mechanism, which is what git reads for every
interactive commit.

Name, prefix and call site are unchanged, so README's setup
bullet stays correct; only the sentence describing the old copy
in CONTRIBUTING needed rewording. Note the config holds a path
relative to the working directory, so it applies to commits made
from the repo root.
This commit is contained in:
tmu committed 2026-09-06 00:26:22 +02:00
1 parent 682ecf1163
commit 892aead383
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -55,7 +55,7 @@
"watch:test": "node --test --watch --strip-types \"src/**/*.test.ts\"",
"publish:attw": "attw . --pack --profile esm-only",
"publish:publint": "publint",
"use:git-commit-message": "cp commit-message-template .git/COMMIT_EDITMSG || true"
"use:git-commit-message": "git config commit.template commit-message-template"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.5",