summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-08-03 22:58:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-08-04 20:33:27 (GMT)
commitc0222e762ef57c59fa793862618cfcdfef1cf3f8 (patch)
tree4161f6b073ba66a00f03c9638ed45ff7770ce84e /contrib
parentc81539b5f6f608ec48358ca6a35f7323e96432e1 (diff)
downloadgit-c0222e762ef57c59fa793862618cfcdfef1cf3f8.zip
git-c0222e762ef57c59fa793862618cfcdfef1cf3f8.tar.gz
git-c0222e762ef57c59fa793862618cfcdfef1cf3f8.tar.bz2
trace: stop using write_or_whine_pipe()
The write_or_whine_pipe function does two things: 1. it checks for EPIPE and converts it into a signal death 2. it prints a message to stderr on error The first thing does not help us, and actively hurts. Generally we would simply die from SIGPIPE in this case, unless somebody has taken the time to ignore SIGPIPE for the whole process. And if they _did_ do that, it seems rather silly for the trace code, which otherwise takes pains to continue even in the face of errors (e.g., by not using write_or_die!), to take down the whole process for one specific type of error. Nor does the second thing help us; it just makes it harder to write our error message, because we have to feed bits of it as an argument to write_or_whine_pipe(). Translators never get to see the full message, and it's hard for us to customize it. Let's switch to just using write_in_full() and writing our own error string. For now, the error is identical to what write_or_whine_pipe() would say, but now that it's more under our control, we can improve it in future patches. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions