diff options
author | Alan Davies <alan.n.davies@gmail.com> | 2016-12-22 18:09:18 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-12-22 09:58:29 -0800 |
commit | 86924838e3d881cda2192fd79ac3a58aad75efd3 (patch) | |
tree | f12336876d5c17b1b338a16db90d8029877fba69 /argv-array.c | |
parent | fee807c5f6da43ba03f4f92d832fd625ab57b0d7 (diff) | |
download | git-86924838e3d881cda2192fd79ac3a58aad75efd3.tar.gz |
mingw: fix colourization on Cygwin pseudo terminals
Git only colours the output and uses pagination if isatty() returns 1.
MSYS2 and Cygwin emulate pseudo terminals via named pipes, meaning that
isatty() returns 0.
f7f90e0f4f (mingw: make isatty() recognize MSYS2's pseudo terminals
(/dev/pty*), 2016-04-27) fixed this for MSYS2 terminals, but not for
Cygwin.
The named pipes that Cygwin and MSYS2 use are very similar. MSYS2 PTY pipes
are called 'msys-*-pty*' and Cygwin uses 'cygwin-*-pty*'. This commit
modifies the existing check to allow both MSYS2 and Cygwin PTY pipes to be
identified as TTYs.
Note that pagination is still broken when running Git for Windows from
within Cygwin, as MSYS2's less.exe is spawned (and does not like to
interact with Cygwin's PTY).
This partially fixes https://github.com/git-for-windows/git/issues/267
Signed-off-by: Alan Davies <alan.n.davies@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'argv-array.c')
0 files changed, 0 insertions, 0 deletions