Files
git/Documentation
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
..
2008-01-14 18:04:51 -08:00
2008-01-29 22:00:34 -08:00
2007-12-14 22:29:38 -08:00
2007-08-10 11:32:42 -07:00
2008-01-17 22:55:25 -08:00
2007-06-07 00:04:01 -07:00
2007-06-07 00:04:01 -07:00
2007-07-24 00:47:05 -07:00
2008-01-29 22:00:34 -08:00
2008-01-14 16:14:29 -08:00
2008-01-07 14:02:00 -08:00
2007-06-07 00:04:01 -07:00
2007-02-18 16:18:43 -08:00
2007-02-26 00:26:06 -08:00
2007-03-04 17:20:38 -08:00
2007-06-07 00:04:01 -07:00
2007-06-07 00:04:01 -07:00
2007-06-07 00:04:01 -07:00
2007-04-03 19:27:41 -07:00
2007-04-21 13:57:07 -07:00
2007-06-07 00:04:01 -07:00
2007-05-08 22:11:17 -07:00
2007-05-20 00:15:53 -07:00
2007-05-20 00:15:53 -07:00
2007-04-03 22:47:01 -07:00
2007-06-02 16:02:49 -07:00
2007-06-16 01:13:35 -07:00
2007-07-02 00:35:58 -07:00
2007-07-12 12:01:47 -07:00
2007-08-15 15:01:20 -07:00
2007-05-20 00:30:39 -07:00
2007-09-19 03:11:28 -07:00
2008-01-29 22:00:34 -08:00
2007-10-03 02:33:48 -07:00
2007-11-18 14:00:38 -08:00
2007-12-01 11:20:00 -08:00
2008-01-07 22:41:43 -08:00
2008-02-01 19:10:10 -08:00