diff options
author | Jeff King <peff@peff.net> | 2016-08-05 03:58:38 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-08-05 09:28:17 -0700 |
commit | 6f25305799f0bbddbac1d678293e8c5cf404deb3 (patch) | |
tree | 4efc903742c4ecad1c4206910a30c782f9cbb4dc /LGPL-2.1 | |
parent | write_or_die: drop write_or_whine_pipe() (diff) | |
download | tgif-6f25305799f0bbddbac1d678293e8c5cf404deb3.tar.xz |
trace: do not fall back to stderr
If the trace code cannot open a specified file, or does not
understand the contents of the GIT_TRACE variable, it falls
back to printing trace output to stderr.
This is an attempt to be helpful, but in practice it just
ends up annoying. The user was trying to get the output to
go somewhere else, so spewing it to stderr does not really
accomplish that. And as it's intended for debugging, they
can presumably re-run the command with their error
corrected.
So instead of falling back, this patch disables bogus trace
keys for the rest of the program, just as we do for write
errors. We can drop the "Defaulting to..." part of the error
message entirely; after seeing "cannot open '/foo'", the
user can assume that tracing is skipped.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'LGPL-2.1')
0 files changed, 0 insertions, 0 deletions