Add commit hook and make the verification customizable.
There are three hooks: - 'pre-commit' is given an opportunity to inspect what is being committed, before we invoke the EDITOR for the commit message; - 'commit-msg' is invoked on the commit log message after the user prepares it; - 'post-commit' is run after a successful commit is made. The first two can interfere to stop the commit. The last one is for after-the-fact notification. The earlier built-in commit checker is now moved to pre-commit. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
8
templates/hooks--post-commit
Normal file
8
templates/hooks--post-commit
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# An example hook script that is called after a successful
|
||||
# commit is made.
|
||||
#
|
||||
# To enable this hook, make this file executable.
|
||||
|
||||
: Nothing
|
Reference in New Issue
Block a user