mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
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
This commit is contained in:
commit
251cb96eab
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue