1
0
mirror of https://github.com/git/git.git synced 2024-09-30 12:32:09 +02:00
git/compat
Karsten Blees f7f90e0f4f mingw: make isatty() recognize MSYS2's pseudo terminals (/dev/pty*)
MSYS2 emulates pseudo terminals via named pipes, and isatty() returns 0
for such file descriptors. Therefore, some interactive functionality
(such as launching a pager, asking if a failed unlink should be repeated
etc.) doesn't work when run in a terminal emulator that uses MSYS2's
ptys (such as mintty).

However, MSYS2 uses special names for its pty pipes ('msys-*-pty*'),
which allows us to distinguish them from normal piped input / output.

On startup, check if stdin / stdout / stderr are connected to such pipes
using the NtQueryObject API from NTDll.dll. If the names match, adjust
the flags in MSVCRT's ioinfo structure accordingly.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-26 13:12:02 -07:00
..
nedmalloc mingw: uglify (a, 0) definitions to shut up warnings 2016-01-15 14:02:39 -08:00
poll mingw: avoid warnings when casting HANDLEs to int 2016-01-15 14:01:52 -08:00
regex Silence GCC's "cast of pointer to integer of a different size" warning 2015-10-26 13:24:03 -07:00
vcbuild MSVC: use shipped headers instead of fallback definitions 2016-03-30 11:16:20 -07:00
win32 Merge branch 'jk/push-client-deadlock-fix' into HEAD 2016-05-18 14:40:06 -07:00
apple-common-crypto.h imap-send: use HMAC() function provided by OpenSSL 2016-04-08 11:45:47 -07:00
basename.c compat/basename.c: provide a dirname() compatibility function 2016-01-12 10:40:54 -08:00
bswap.h bswap: add NO_UNALIGNED_LOADS define 2016-01-04 09:51:33 -08:00
fopen.c
gmtime.c
hstrerror.c compat/hstrerror: convert sprintf to snprintf 2015-09-25 10:18:18 -07:00
inet_ntop.c compat/inet_ntop: fix off-by-one in inet_ntop4 2015-09-25 10:18:18 -07:00
inet_pton.c
memmem.c
mingw.c Windows: shorten code by re-using convert_slashes() 2016-04-04 18:03:02 -07:00
mingw.h Merge branch 'jk/push-client-deadlock-fix' into HEAD 2016-05-18 14:40:06 -07:00
mkdir.c
mkdtemp.c
mmap.c
msvc.c
msvc.h
obstack.c
obstack.h
pread.c
precompose_utf8.c config: rename git_config_set_or_die to git_config_set 2016-02-22 10:23:55 -08:00
precompose_utf8.h probe_utf8_pathname_composition: use internal strbuf 2015-10-05 11:06:49 -07:00
qsort.c use st_add and st_mult for allocation size computation 2016-02-22 14:51:09 -08:00
setenv.c use st_add and st_mult for allocation size computation 2016-02-22 14:51:09 -08:00
sha1-chunked.c sha1: allow limiting the size of the data passed to SHA1_Update() 2015-11-05 10:35:11 -08:00
sha1-chunked.h sha1: allow limiting the size of the data passed to SHA1_Update() 2015-11-05 10:35:11 -08:00
snprintf.c MSVC: vsnprintf in Visual Studio 2015 doesn't need SNPRINTF_SIZE_CORR any more 2016-03-30 11:13:01 -07:00
stat.c
strcasestr.c
strlcpy.c
strtoimax.c
strtoumax.c
terminal.c strbuf: introduce strbuf_getline_{lf,nul}() 2016-01-15 10:12:51 -08:00
terminal.h
unsetenv.c
win32.h
win32mmap.c mmap(win32): avoid expensive fstat() call 2016-04-22 15:01:16 -07:00
winansi.c mingw: make isatty() recognize MSYS2's pseudo terminals (/dev/pty*) 2016-05-26 13:12:02 -07:00