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

Re: [PATCH-v4 4/4] git-commit: add a prepare-commit-msg hook

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 6, 2008, 09:08 UTC
Message-ID
<7vy79y1mhb.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<E1JMfN3-0006XI-Qs@fencepost.gnu.org>
Paolo Bonzini <bonzini@gnu.org> writes:
> 	The way it can be used instead of the pre-commit hook
> 	is now documented differently: it is for verification
> 	that must *not* be skipped even for automatic commits
> 	(if there is such a beast).

I really do not think we should encourage this as a verification method. If you encourage it as such, I am sure people would complain "Why can't I bypass this hook with --no-verify!!!". I do not want to spend cycles defending the behaviour to error out on non-zero exit from the hook.

Instead, I think you should _stress_ that people must _NOT_ use this as a replacement for pre-commit hook.

The same comment applies to the comment in the example hook.
Previous: Paolo BonziniNext: Paolo Bonzini
Message 4 of 7 in “git-commit: add a prepare-commit-msg hook”
  1. 4/4 git-commit: add a prepare-commit-msg hookPaolo Bonzini, Feb 6, 2008
  2. Junio C HamanoFeb 6, 2008
  3. 4/4 git-commit: add a prepare-commit-msg hookPaolo Bonzini, Feb 5, 2008
  4. Junio C HamanoFeb 6, 2008
  5. 4/4 git-commit: add a prepare-commit-msg hookPaolo Bonzini, Feb 5, 2008
  6. Junio C HamanoFeb 6, 2008
  7. 4/4 git-commit: add a prepare-commit-msg hookPaolo Bonzini, Feb 6, 2008

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.