diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-06-25 11:43:43 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-06-25 11:43:43 -0700 |
commit | 73505ef7a5f5da4f31a86a12c1ab47ffcebdb73a (patch) | |
tree | 9b66aef1222128b872d557d46e72351db24b099a | |
parent | e293c563b00f9adfff44676d7406d40194aff228 (diff) | |
parent | 38de156a05a4421103e93d43b36e9967e63fb707 (diff) | |
download | git-73505ef7a5f5da4f31a86a12c1ab47ffcebdb73a.tar.gz git-73505ef7a5f5da4f31a86a12c1ab47ffcebdb73a.tar.xz |
Merge branch 'mn/sideband-no-ansi' into maint
Tools that read diagnostic output in our standard error stream do
not want to see terminal control sequence (e.g. erase-to-eol).
Detect them by checking if the standard error stream is connected
to a tty.
* mn/sideband-no-ansi:
sideband.c: do not use ANSI control sequence on non-terminal
-rw-r--r-- | sideband.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sideband.c b/sideband.c index d1125f5c5..7f9dc229f 100644 --- a/sideband.c +++ b/sideband.c @@ -30,7 +30,7 @@ int recv_sideband(const char *me, int in_stream, int out) memcpy(buf, PREFIX, pf); term = getenv("TERM"); - if (term && strcmp(term, "dumb")) + if (isatty(2) && term && strcmp(term, "dumb")) suffix = ANSI_SUFFIX; else suffix = DUMB_SUFFIX; |