diff options
| author | Junio C Hamano <gitster@pobox.com> | 2014-06-09 11:27:55 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2014-06-09 11:27:56 -0700 |
| commit | 251cb96eabb983ee1b699254399642b306cf19bf (patch) | |
| tree | 03da1ab8edbd6dae26b49292616835b83452b1f6 | |
| parent | d37e8c54a60c4aa92e1bb412b416ca1fea821587 (diff) | |
| parent | 38de156a05a4421103e93d43b36e9967e63fb707 (diff) | |
| download | git-251cb96eabb983ee1b699254399642b306cf19bf.tar.xz | |
Merge branch 'mn/sideband-no-ansi'
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 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; |
