summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-06-25 11:43:43 -0700
committerJunio C Hamano <gitster@pobox.com>2014-06-25 11:43:43 -0700
commit73505ef7a5f5da4f31a86a12c1ab47ffcebdb73a (patch)
tree9b66aef1222128b872d557d46e72351db24b099a
parente293c563b00f9adfff44676d7406d40194aff228 (diff)
parent38de156a05a4421103e93d43b36e9967e63fb707 (diff)
downloadgit-73505ef7a5f5da4f31a86a12c1ab47ffcebdb73a.tar.gz
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sideband.c b/sideband.c
index d1125f5c52..7f9dc229fb 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;