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

gitk and hook script

From
RCRomaric Crailox <romaric.crailox@gmail.com>
Date
Mar 31, 2016, 17:06 UTC
Message-ID
<CACRny=SO+EpYZhb_hbyJiAcN=hGCeHR4znh7+uiBHgRuGih6yw@mail.gmail.com>
Hello

I want to deploy a hook script to control format of commit message. For this I use the prepare-commit-msg script. I want to check if the commit message starts with a number of 3 digits. If this is the case, the script returns 0, otherwise 1. It works fine for an utilisation with the git command, but it doesn't when used with gitk. When script returns 1, the commit is not aborded. I don't manage to display message either (an information message explaining why commit will be abort).

Is there a way to use hook script with gitk?
Thanks.
CRAILOX Romaric
PS: I use git version 1.8.5.3
Message 1 of 1 in “gitk and hook script”
  1. Romaric CrailoxMar 31, 2016

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.