From 844cb2210d9fc66627c562b7a2fdaf6b9cd52ae1 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Fri, 4 Feb 2011 09:41:58 +0100 Subject: [PATCH] start_command: flush buffers in the WIN32 code path as well The POSIX code path did The Right Thing already, but we have to do the same on Windows. This bug caused failures in t5526-fetch-submodules, where the output of 'git fetch --recurse-submodules' was in the wrong order. Debugged-by: Johannes Schindelin Signed-off-by: Johannes Sixt Signed-off-by: Pat Thoyts --- run-command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-command.c b/run-command.c index 2a1041ef65..f91e446c86 100644 --- a/run-command.c +++ b/run-command.c @@ -194,6 +194,7 @@ fail_pipe: } trace_argv_printf(cmd->argv, "trace: run_command:"); + fflush(NULL); #ifndef WIN32 { @@ -201,7 +202,6 @@ fail_pipe: if (pipe(notify_pipe)) notify_pipe[0] = notify_pipe[1] = -1; - fflush(NULL); cmd->pid = fork(); if (!cmd->pid) { /* -- 2.11.4.GIT