# gitk and hook script

1 messages from 2016-03-31 to 2016-03-31. Participants: Romaric Crailox.
Thread: https://gitlist.dev/t/41888

## Romaric Crailox, 2016-03-31 17:06

Subject: gitk and hook script
Message-ID: <CACRny=SO+EpYZhb_hbyJiAcN=hGCeHR4znh7+uiBHgRuGih6yw@mail.gmail.com>
URL: https://gitlist.dev/e/CACRny%3DSO%2BEpYZhb_hbyJiAcN%3DhGCeHR4znh7%2BuiBHgRuGih6yw%40mail.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

```
