So I've recently cloned the gnu-coreutils to see how the programs I use actually work, and to get more familiar with git, especially git's CLI. But when I tried committing a change I made to basename.c by using git commit src/basename.c with the description basename: some-desc, it returned the error
commit-msg: invalid first word(s) of summary line: basename
Interrupt (Ctrl-C) to abort...
Too many errors from stdin
commit-msg: .git/COMMIT_EDITMSG: the editor (editor) failed, aborting
This description follows the guidelines from the "HACKING" file included in the repository:
Try to make the summary line fit one of the following forms:
program_name: change-description
prog1, prog2: change-description
doc: change-description
tests: change-description
build: change-description
maint: change-description
but still git doesn't accept basename as the program name.
The names of other programs like cat, base64 and chcon work however, so maybe this is just a bug?
I also tried googling the issue, but except for general guidelines on how to format git commit messages I couldn't find anything.
The coreutils repository sets up Git hooks in your local clone of the repository. You can find the commit message check in
scripts/git-hooks/commit-msg.It is run every time you try to commit. It defines the allowed keywords starting in line 14:
basenameis not among them, butnbasenameis.To temporarily disable running commit hooks, specify
--no-verifyduring commit.EDIT: I have submitted a patch to the coreutils project to fix this typo: https://lists.gnu.org/archive/html/coreutils/2022-01/msg00013.html. Let's see :)
EDIT: This is now fixed as of commit 95ec19ecbd125598f047a938882f5bba81f0e9a3