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

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

From
Paolo Bonzini <bonzini@gnu.org>
Date
Feb 5, 2008, 15:16 UTC
Message-ID
<47A87DDC.5030708@gnu.org>
In-Reply-To
<alpine.LSU.1.00.0802051500190.8543@racer.site>
Johannes Schindelin wrote:
Show 9 quoted lines
> Hi,
> 
> On Tue, 5 Feb 2008, Paolo Bonzini wrote:
> 
>> The hook is not suppressed by the --no-verify option, and the
>> exit status is ignored by git.
> 
> Umm.  Should the exit status really be ignored?  What _use_ would it be 
> then?

None; in the previous version I used an exit status of 1 to kill the commit. But since this hook, unlike others, is meant to prepare things for the user, the hook itself was not suppressed by --no-verify, only checking the exit status. Junio thought it was a mess, so I now completely ignore the exit status.

I just wrote the above sentence because prepare-commit-msg is the only git-commit hook whose exit status is ignored.

Paolo
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 6 of 9 in “git-commit: support variable number of hook arguments”
  1. 1/4 git-commit: support variable number of hook argumentsPaolo Bonzini, Feb 5, 2008
  2. 2/4 git-commit: set GIT_EDITOR=: if editor will not be launchedPaolo Bonzini, Feb 5, 2008
  3. 3/4 git-commit: Refactor creation of log message.Paolo Bonzini, Feb 5, 2008
  4. 4/4 git-commit: add a prepare-commit-msg hookPaolo Bonzini, Feb 5, 2008
  5. Johannes SchindelinFeb 5, 2008
  6. Paolo BonziniFeb 5, 2008
  7. Johannes SchindelinFeb 5, 2008
  8. Paolo BonziniFeb 5, 2008
  9. Junio C HamanoFeb 5, 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.