Skip to content

Commit 3aadad1

Browse files
author
Junio C Hamano
committed
Documentation: stdout of update-hook is connected to /dev/null
Mention that update-hook does not emit its stdout to the sender. Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent ef1cc2c commit 3aadad1

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Documentation/hooks.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ Another use suggested on the mailing list is to use this hook to
111111
implement access control which is finer grained than the one
112112
based on filesystem group.
113113

114+
The standard output of this hook is sent to /dev/null; if you
115+
want to report something to the git-send-pack on the other end,
116+
you can redirect your output to your stderr.
117+
114118
post-update
115119
-----------
116120

@@ -125,3 +129,7 @@ the outcome of `git-receive-pack`.
125129
The default post-update hook, when enabled, runs
126130
`git-update-server-info` to keep the information used by dumb
127131
transport up-to-date.
132+
133+
The standard output of this hook is sent to /dev/null; if you
134+
want to report something to the git-send-pack on the other end,
135+
you can redirect your output to your stderr.

Documentation/howto/rebuild-from-update-hook.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The pages under http://www.kernel.org/pub/software/scm/git/docs/
1010
are built from Documentation/ directory of the git.git project
1111
and needed to be kept up-to-date. The www.kernel.org/ servers
1212
are mirrored and I was told that the origin of the mirror is on
13-
the machine master.kernel.org, on which I was given an account
13+
the machine $some.kernel.org, on which I was given an account
1414
when I took over git maintainership from Linus.
1515

1616
The directories relevant to this how-to are these two:
@@ -63,7 +63,7 @@ like this:
6363
EOF
6464
$ chmod +x /pub/scm/git/git.git/hooks/post-update
6565

66-
There are three things worth mentioning:
66+
There are four things worth mentioning:
6767

6868
- The update-hook is run after the repository accepts a "git
6969
push", under my user privilege. It is given the full names
@@ -77,6 +77,10 @@ There are three things worth mentioning:
7777
pull" it does into $HOME/doc-git/docgen/ repository would not
7878
work correctly.
7979

80+
- The stdout of update hook script is not connected to git
81+
push; I run the heavy part of the command inside "at", to
82+
receive the execution report via e-mail.
83+
8084
- This is still crude and does not protect against simultaneous
8185
make invocations stomping on each other. I would need to add
8286
some locking mechanism for this.

0 commit comments

Comments
 (0)