@@ -115,8 +115,9 @@ If the hook exits with non-zero status, none of the refs will be
115
115
updated. If the hook exits with zero, updating of individual refs can
116
116
still be prevented by the <<update,'update'>> hook.
117
117
118
- If you want to report something to the `git-send-pack` on the other end,
119
- you can simply `echo` your messages.
118
+ Both standard output and standard error output are forwarded to
119
+ `git-send-pack` on the other end, so you can simply `echo` messages
120
+ for the user.
120
121
121
122
[[update]]
122
123
update
@@ -153,9 +154,9 @@ Another use suggested on the mailing list is to use this hook to
153
154
implement access control which is finer grained than the one
154
155
based on filesystem group.
155
156
156
- The standard output of this hook is sent to `stderr`, so if you
157
- want to report something to the `git-send-pack` on the other end,
158
- you can simply `echo` your messages .
157
+ Both standard output and standard error output are forwarded to
158
+ `git-send-pack` on the other end, so you can simply `echo` messages
159
+ for the user .
159
160
160
161
The default 'update' hook, when enabled--and with
161
162
`hooks.allowunannotated` config option turned on--prevents
@@ -171,17 +172,20 @@ It executes on the remote repository once after all the refs have
171
172
been updated.
172
173
173
174
This hook executes once for the receive operation. It takes no
174
- arguments, but gets the same information as the `pre-receive`
175
+ arguments, but gets the same information as the
176
+ <<pre-receive,'pre-receive'>>
175
177
hook does on its standard input.
176
178
177
179
This hook does not affect the outcome of `git-receive-pack`, as it
178
180
is called after the real work is done.
179
181
180
- This supersedes the [[post-update]] hook in that it actually get's
181
- both old and new values of all the refs.
182
+ This supersedes the <<post-update,'post-update'>> hook in that it get's
183
+ both old and new values of all the refs in addition to their
184
+ names.
182
185
183
- If you want to report something to the `git-send-pack` on the
184
- other end, you can simply `echo` your messages.
186
+ Both standard output and standard error output are forwarded to
187
+ `git-send-pack` on the other end, so you can simply `echo` messages
188
+ for the user.
185
189
186
190
The default 'post-receive' hook is empty, but there is
187
191
a sample script `post-receive-email` provided in the `contrib/hooks`
@@ -205,12 +209,10 @@ the outcome of `git-receive-pack`.
205
209
206
210
The 'post-update' hook can tell what are the heads that were pushed,
207
211
but it does not know what their original and updated values are,
208
- so it is a poor place to do log old..new.
209
-
210
- In general, `post-receive` hook is preferred when the hook needs
211
- to decide its acion on the status of the entire set of refs
212
- being updated, as this hook is called once per ref, with
213
- information only on a single ref at a time.
212
+ so it is a poor place to do log old..new. The
213
+ <<post-receive,'post-receive'>> hook does get both original and
214
+ updated values of the refs. You might consider it instead if you need
215
+ them.
214
216
215
217
When enabled, the default 'post-update' hook runs
216
218
`git-update-server-info` to keep the information used by dumb
@@ -219,4 +221,5 @@ a git repository that is accessible via HTTP, you should
219
221
probably enable this hook.
220
222
221
223
Both standard output and standard error output are forwarded to
222
- `git-send-pack` on the other end.
224
+ `git-send-pack` on the other end, so you can simply `echo` messages
225
+ for the user.
0 commit comments