git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Bug report: Parameters for the `prepare-commit-msg` hook could use better documentation.

From
DRDan Rose <dan@digilabs.io>
Date
May 26, 2020, 23:43 UTC
Message-ID
<CAJGDnb1eXBQtoAtGu6u7atmrHTbmtcBzuZpOixr2EWsLjD1SiA@mail.gmail.com>

Bug report: Parameters for the `prepare-commit-msg` hook could use better documentation.

1. It's not clear under which circumstances the number of parameters
varies (e.g. "When there is no initial commit message text, the hook
gets one parameter. When the commit message is derived from another
commit, the hook gets three parameters. In all other cases, the hook
gets two parameters)
2. It is hard to tell what third parameter's relation to the preceding
list of commit message sources. Replacing the list with just the third
item shows that, grammatically, the documentation says the SHA-1 is
part of the second parameter: "The second is the source of the commit
message, and can be ... commit, followed by a commit SHA-1 (if a -c,
-C or --amend option was given)."
3. The types of values the third parameter can take include "HEAD", an
unambiguous sha-1 prefix, or seemingly any type of commit reference.
This is not documented.
Message 1 of 1 in “Bug report: Parameters for the `prepare-commit-msg` hook could use better documentation.”
  1. Dan RoseMay 26, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.