author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 31 Dec 2006 02:55:19 +0000 (21:55 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 31 Dec 2006 06:22:14 +0000 (22:22 -0800) | ||
commit | cd83c74cb3161a19b5efd33f40cfe378c2f64ddb | |
tree | 9d6d657ce34aae3f155d402d4bfaab34a4fcb537 | tree | snapshot |
parent | 9b0b50936ec76ad8e582d18d5bf54bc81c685e9b | commit | diff |
Redirect update hook stdout to stderr.
If an update hook outputs to stdout then that output will be sent
back over the wire to the push client as though it were part of
the git protocol. This tends to cause protocol errors on the
client end of the connection, as the hook output is not expected
in that context. Most hook developers work around this by making
sure their hook outputs everything to stderr.
But hooks shouldn't need to perform such special behavior. Instead
we can just dup stderr to stdout prior to invoking the update hook.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
If an update hook outputs to stdout then that output will be sent
back over the wire to the push client as though it were part of
the git protocol. This tends to cause protocol errors on the
client end of the connection, as the hook output is not expected
in that context. Most hook developers work around this by making
sure their hook outputs everything to stderr.
But hooks shouldn't need to perform such special behavior. Instead
we can just dup stderr to stdout prior to invoking the update hook.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
receive-pack.c | diff | blob | history | |
run-command.c | diff | blob | history | |
run-command.h | diff | blob | history |