From: Jeff King Date: Sat, 19 Apr 2014 19:19:30 +0000 (-0400) Subject: run_external_diff: drop fflush(NULL) X-Git-Tag: v2.1.0-rc0~195^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5b88caa417ab221c8f8576332fba8d41dd3986d7?hp=89294d143d42db2540ec587d0bce20c6c7718051 run_external_diff: drop fflush(NULL) This fflush was added in d5535ec (Use run_command() to spawn external diff programs instead of fork/exec., 2007-10-19), because flushing buffers before forking is a good habit. But later, 7d0b18a (Add output flushing before fork(), 2008-08-04) added it to the generic run-command interface, meaning that our flush here is redundant. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/diff.c b/diff.c index 174f146d0d..4bad556812 100644 --- a/diff.c +++ b/diff.c @@ -2932,7 +2932,6 @@ static void run_external_diff(const char *pgm, argv_array_push(&argv, pgm); argv_array_push(&argv, name); } - fflush(NULL); argv_array_pushf(&env, "GIT_DIFF_PATH_COUNTER=%d", ++o->diff_path_counter); argv_array_pushf(&env, "GIT_DIFF_PATH_TOTAL=%d", q->nr);