Fix trivial typos and inconsistencies in hooks documentation
Pointed out by Alan Chandler. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
Jonas Fonseca committed
Sep 20, 2006 at 12:15 UTC
45ad9b5096b5b823f8cec562500dc8830d5961b5
1 file changed
+28
-28
Documentation/hooks.txt
+28
-28
@@ -5,8 +5,7 @@ Hooks are little scripts you can place in `$GIT_DIR/hooks`
5
directory to trigger action at certain points. When
6
`git-init-db` is run, a handful example hooks are copied in the
7
`hooks` directory of the new repository, but by default they are
8
-all disabled. To enable a hook, make it executable with `chmod
9
-+x`.
8
+all disabled. To enable a hook, make it executable with `chmod +x`.
9
10
This document describes the currently defined hooks.
11
@@ -16,16 +15,16 @@ applypatch-msg
15
This hook is invoked by `git-applypatch` script, which is
16
typically invoked by `git-applymbox`. It takes a single
17
parameter, the name of the file that holds the proposed commit
19
-log message. Exiting with non-zero status causes the
20
-'git-applypatch' to abort before applying the patch.
18
+log message. Exiting with non-zero status causes
19
+`git-applypatch` to abort before applying the patch.
20
21
The hook is allowed to edit the message file in place, and can
22
be used to normalize the message into some project standard
23
format (if the project has one). It can also be used to refuse
24
the commit after inspecting the message file.
25
27
-The default applypatch-msg hook, when enabled, runs the
28
-commit-msg hook, if the latter is enabled.
26
+The default 'applypatch-msg' hook, when enabled, runs the
27
+'commit-msg' hook, if the latter is enabled.
28
29
pre-applypatch
30
--------------
@@ -39,8 +38,8 @@ after application of the patch not committed.
38
It can be used to inspect the current working tree and refuse to
39
make a commit if it does not pass certain test.
40
42
-The default pre-applypatch hook, when enabled, runs the
43
-pre-commit hook, if the latter is enabled.
41
+The default 'pre-applypatch' hook, when enabled, runs the
42
+'pre-commit' hook, if the latter is enabled.
43
44
post-applypatch
45
---------------
@@ -61,9 +60,9 @@ invoked before obtaining the proposed commit log message and
60
making a commit. Exiting with non-zero status from this script
61
causes the `git-commit` to abort.
62
64
-The default pre-commit hook, when enabled, catches introduction
63
+The default 'pre-commit' hook, when enabled, catches introduction
64
of lines with trailing whitespaces and aborts the commit when
66
-a such line is found.
65
+such a line is found.
66
67
commit-msg
68
----------
@@ -79,8 +78,8 @@ be used to normalize the message into some project standard
78
format (if the project has one). It can also be used to refuse
79
the commit after inspecting the message file.
80
82
-The default commit-msg hook, when enabled, detects duplicate
83
-Signed-off-by: lines, and aborts the commit when one is found.
81
+The default 'commit-msg' hook, when enabled, detects duplicate
82
+"Signed-off-by" lines, and aborts the commit if one is found.
83
84
post-commit
85
-----------
@@ -91,23 +90,24 @@ parameter, and is invoked after a commit is made.
90
This hook is meant primarily for notification, and cannot affect
91
the outcome of `git-commit`.
92
94
-The default post-commit hook, when enabled, demonstrates how to
93
+The default 'post-commit' hook, when enabled, demonstrates how to
94
send out a commit notification e-mail.
95
96
update
97
------
98
99
This hook is invoked by `git-receive-pack` on the remote repository,
101
-which is happens when a `git push` is done on a local repository.
100
+which happens when a `git push` is done on a local repository.
101
Just before updating the ref on the remote repository, the update hook
102
is invoked. Its exit status determines the success or failure of
103
the ref update.
104
105
The hook executes once for each ref to be updated, and takes
106
three parameters:
108
- - the name of the ref being updated,
109
- - the old object name stored in the ref,
110
- - and the new objectname to be stored in the ref.
107
+
108
+ - the name of the ref being updated,
109
+ - the old object name stored in the ref,
110
+ - and the new objectname to be stored in the ref.
111
112
A zero exit from the update hook allows the ref to be updated.
113
Exiting with a non-zero status prevents `git-receive-pack`
@@ -126,16 +126,16 @@ Another use suggested on the mailing list is to use this hook to
126
implement access control which is finer grained than the one
127
based on filesystem group.
128
129
-The standard output of this hook is sent to /dev/null; if you
130
-want to report something to the git-send-pack on the other end,
131
-you can redirect your output to your stderr.
129
+The standard output of this hook is sent to `/dev/null`; if you
130
+want to report something to the `git-send-pack` on the other end,
131
+you can redirect your output to your `stderr`.
132
133
134
post-update
135
-----------
136
137
This hook is invoked by `git-receive-pack` on the remote repository,
138
-which is happens when a `git push` is done on a local repository.
138
+which happens when a `git push` is done on a local repository.
139
It executes on the remote repository once after all the refs have
140
been updated.
141
@@ -145,16 +145,16 @@ name of ref that was actually updated.
145
This hook is meant primarily for notification, and cannot affect
146
the outcome of `git-receive-pack`.
147
148
-The post-update hook can tell what are the heads that were pushed,
148
+The 'post-update' hook can tell what are the heads that were pushed,
149
but it does not know what their original and updated values are,
150
so it is a poor place to do log old..new.
151
152
-The default post-update hook, when enabled, runs
152
+When enabled, the default 'post-update' hook runs
153
`git-update-server-info` to keep the information used by dumb
154
-transports (e.g., http) up-to-date. If you are publishing
155
-a git repository that is accessible via http, you should
154
+transports (e.g., HTTP) up-to-date. If you are publishing
155
+a git repository that is accessible via HTTP, you should
156
probably enable this hook.
157
158
-The standard output of this hook is sent to /dev/null; if you
159
-want to report something to the git-send-pack on the other end,
160
-you can redirect your output to your stderr.
158
+The standard output of this hook is sent to `/dev/null`; if you
159
+want to report something to the `git-send-pack` on the other end,
160
+you can redirect your output to your `stderr`.