githooks.txt: put hooks into subsections
All hooks are currently in its own section. Which may confuse users, because the section name serves as the hook file name and sections are all caps for man pages. Putting them into a new HOOKS section and each hook into a subsection keeps the case to lower case. Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Bert Wesarg committed
Sep 6, 2009 at 12:22 UTC
6d71c1dca4396de545a6c9667b3dcf0c03e42b30
1 file changed
+18
-15
Documentation/githooks.txt
+18
-15
@@ -26,8 +26,11 @@ executable by default.
26
27
This document describes the currently defined hooks.
28
29
+HOOKS
30
+-----
31
+
32
applypatch-msg
30
---------------
33
+~~~~~~~~~~~~~~
34
35
This hook is invoked by 'git-am' script. It takes a single
36
parameter, the name of the file that holds the proposed commit
@@ -43,7 +46,7 @@ The default 'applypatch-msg' hook, when enabled, runs the
46
'commit-msg' hook, if the latter is enabled.
47
48
pre-applypatch
46
---------------
49
+~~~~~~~~~~~~~~
50
51
This hook is invoked by 'git-am'. It takes no parameter, and is
52
invoked after the patch is applied, but before a commit is made.
@@ -58,7 +61,7 @@ The default 'pre-applypatch' hook, when enabled, runs the
61
'pre-commit' hook, if the latter is enabled.
62
63
post-applypatch
61
----------------
64
+~~~~~~~~~~~~~~~
65
66
This hook is invoked by 'git-am'. It takes no parameter,
67
and is invoked after the patch is applied and a commit is made.
@@ -67,7 +70,7 @@ This hook is meant primarily for notification, and cannot affect
70
the outcome of 'git-am'.
71
72
pre-commit
70
-----------
73
+~~~~~~~~~~
74
75
This hook is invoked by 'git-commit', and can be bypassed
76
with `\--no-verify` option. It takes no parameter, and is
@@ -84,7 +87,7 @@ variable `GIT_EDITOR=:` if the command will not bring up an editor
87
to modify the commit message.
88
89
prepare-commit-msg
87
-------------------
90
+~~~~~~~~~~~~~~~~~~
91
92
This hook is invoked by 'git-commit' right after preparing the
93
default log message, and before the editor is started.
@@ -109,7 +112,7 @@ The sample `prepare-commit-msg` hook that comes with git comments
112
out the `Conflicts:` part of a merge's commit message.
113
114
commit-msg
112
-----------
115
+~~~~~~~~~~
116
117
This hook is invoked by 'git-commit', and can be bypassed
118
with `\--no-verify` option. It takes a single parameter, the
@@ -126,7 +129,7 @@ The default 'commit-msg' hook, when enabled, detects duplicate
129
"Signed-off-by" lines, and aborts the commit if one is found.
130
131
post-commit
129
------------
132
+~~~~~~~~~~~
133
134
This hook is invoked by 'git-commit'. It takes no
135
parameter, and is invoked after a commit is made.
@@ -135,14 +138,14 @@ This hook is meant primarily for notification, and cannot affect
138
the outcome of 'git-commit'.
139
140
pre-rebase
138
-----------
141
+~~~~~~~~~~
142
143
This hook is called by 'git-rebase' and can be used to prevent a branch
144
from getting rebased.
145
146
147
post-checkout
145
------------
148
+~~~~~~~~~~~~~
149
150
This hook is invoked when a 'git-checkout' is run after having updated the
151
worktree. The hook is given three parameters: the ref of the previous HEAD,
@@ -160,7 +163,7 @@ differences from the previous HEAD if different, or set working dir metadata
163
properties.
164
165
post-merge
163
------------
166
+~~~~~~~~~~
167
168
This hook is invoked by 'git-merge', which happens when a 'git-pull'
169
is done on a local repository. The hook takes a single parameter, a status
@@ -175,7 +178,7 @@ for an example of how to do this.
178
179
[[pre-receive]]
180
pre-receive
178
------------
181
+~~~~~~~~~~~
182
183
This hook is invoked by 'git-receive-pack' on the remote repository,
184
which happens when a 'git-push' is done on a local repository.
@@ -204,7 +207,7 @@ for the user.
207
208
[[update]]
209
update
207
-------
210
+~~~~~~
211
212
This hook is invoked by 'git-receive-pack' on the remote repository,
213
which happens when a 'git-push' is done on a local repository.
@@ -247,7 +250,7 @@ unannotated tags to be pushed.
250
251
[[post-receive]]
252
post-receive
250
-------------
253
+~~~~~~~~~~~~
254
255
This hook is invoked by 'git-receive-pack' on the remote repository,
256
which happens when a 'git-push' is done on a local repository.
@@ -277,7 +280,7 @@ emails.
280
281
[[post-update]]
282
post-update
280
------------
283
+~~~~~~~~~~~
284
285
This hook is invoked by 'git-receive-pack' on the remote repository,
286
which happens when a 'git-push' is done on a local repository.
@@ -308,7 +311,7 @@ Both standard output and standard error output are forwarded to
311
for the user.
312
313
pre-auto-gc
311
------------
314
+~~~~~~~~~~~
315
316
This hook is invoked by 'git-gc --auto'. It takes no parameter, and
317
exiting with non-zero status from this script causes the 'git-gc --auto'