diff options
author | Jeff King <peff@peff.net> | 2016-08-03 19:01:04 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-08-05 09:28:16 -0700 |
commit | 46ac74b71681f1d2ff29615236193e651dcdd9fe (patch) | |
tree | f25c09a702b581d49a3a8ab76c817ff45e597958 /t/t9139-git-svn-non-utf8-commitencoding.sh | |
parent | trace: correct variable name in write() error message (diff) | |
download | tgif-46ac74b71681f1d2ff29615236193e651dcdd9fe.tar.xz |
trace: disable key after write error
If we get a write error writing to a trace descriptor, the
error isn't likely to go away if we keep writing. Instead,
you'll just get the same error over and over. E.g., try:
GIT_TRACE_PACKET=42 git ls-remote >/dev/null
You don't really need to see:
warning: unable to write trace for GIT_TRACE_PACKET: Bad file descriptor
hundreds of times. We could fallback to tracing to stderr,
as we do in the error code-path for open(), but there's not
much point. If the user fed us a bogus descriptor, they're
probably better off fixing their invocation. And if they
didn't, and we saw a transient error (e.g., ENOSPC writing
to a file), it probably doesn't help anybody to have half of
the trace in a file, and half on stderr.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9139-git-svn-non-utf8-commitencoding.sh')
0 files changed, 0 insertions, 0 deletions