summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-02-16 14:45:13 -0800
committerJunio C Hamano <gitster@pobox.com>2017-02-16 14:45:13 -0800
commite048a257bfe66e6eead5e212b5449ffd108de707 (patch)
treee28774ab8bf3d8d49004b13c27ad652cce9d60d5 /compat
parent1e00c41fd69a94be423cf5278e75da594c23eb9d (diff)
parenta4d92d579f792e8eac4f7cf590bfffc522bf3da9 (diff)
downloadgit-e048a257bfe66e6eead5e212b5449ffd108de707.tar.gz
Merge branch 'js/mingw-isatty'
A hotfix for a topic already in 'master'. * js/mingw-isatty: mingw: make stderr unbuffered again
Diffstat (limited to 'compat')
-rw-r--r--compat/winansi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/compat/winansi.c b/compat/winansi.c
index 82b89ab137..793420f9d0 100644
--- a/compat/winansi.c
+++ b/compat/winansi.c
@@ -510,6 +510,8 @@ static HANDLE swap_osfhnd(int fd, HANDLE new_handle)
*/
close(new_fd);
+ if (fd == 2)
+ setvbuf(stderr, NULL, _IONBF, BUFSIZ);
fd_is_interactive[fd] |= FD_SWAPPED;
return duplicate;
@@ -547,6 +549,8 @@ static void detect_msys_tty(int fd)
!wcsstr(name, L"-pty"))
return;
+ if (fd == 2)
+ setvbuf(stderr, NULL, _IONBF, BUFSIZ);
fd_is_interactive[fd] |= FD_MSYS;
}