git/templates
Paolo Bonzini 8089c85bcb git-commit: add a prepare-commit-msg hook
The prepare-commit-msg hook is run whenever a "fresh" commit message
is prepared, just before it is shown in the editor (if it is).
Its purpose is to modify the commit message in-place.

It takes one to three parameters.  The first is the name of the file that
the commit log message.  The second is the source of the commit message,
and can be: "message" (if a -m or -F option was given); "template" (if a
-t option was given or the configuration option commit.template is set);
"merge" (if the commit is a merge or a .git/MERGE_MSG file exists);
"squash" (if a .git/SQUASH_MSG file exists); or "commit", followed by
a commit SHA1 as the third parameter (if a -c, -C or --amend option
was given).

If its exit status is non-zero, git-commit will abort.  The hook is
not suppressed by the --no-verify option, so it should not be used
as a replacement for the pre-commit hook.

The sample prepare-commit-msg comments out the `Conflicts:` part of
a merge's commit message; other examples are commented out, including
adding a Signed-off-by line at the bottom of the commit messsage,
that the user can then edit or discard altogether.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-06 02:26:55 -08:00
..
.gitignore Add new programs and stamp file to .gitignore. 2005-10-14 17:13:49 -07:00
branches-- Redo the templates generation and installation. 2005-08-06 13:49:26 -07:00
hooks--applypatch-msg sample hooks template. 2006-02-26 15:16:41 -08:00
hooks--commit-msg git-commit: add a prepare-commit-msg hook 2008-02-06 02:26:55 -08:00
hooks--post-commit Add commit hook and make the verification customizable. 2005-08-19 16:23:31 -07:00
hooks--post-receive War on whitespace 2007-06-07 00:04:01 -07:00
hooks--post-update Install sample hooks 2005-08-03 16:27:38 -07:00
hooks--pre-applypatch War on whitespace 2007-06-07 00:04:01 -07:00
hooks--pre-commit Make default pre-commit hook less noisy 2008-01-14 13:52:27 -08:00
hooks--pre-rebase rebase: allow a hook to refuse rebasing. 2006-02-13 00:17:33 -08:00
hooks--prepare-commit-msg git-commit: add a prepare-commit-msg hook 2008-02-06 02:26:55 -08:00
hooks--update Officially deprecate repo-config. 2008-01-17 22:52:40 -08:00
info--exclude Redo the templates generation and installation. 2005-08-06 13:49:26 -07:00
Makefile install-sh from automake does not like -m without delimiting space 2007-12-03 22:11:53 -08:00
this--description Redo the templates generation and installation. 2005-08-06 13:49:26 -07:00