run_external_diff: drop fflush(NULL)
authorJeff King <peff@peff.net>
Sat, 19 Apr 2014 19:19:30 +0000 (15:19 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Apr 2014 17:31:51 +0000 (10:31 -0700)
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
diff --git a/diff.c b/diff.c
index 174f146d0d89e03d4f603c0c2d7cd9153de14388..4bad556812898b3023223313c2b3797dd333fc45 100644 (file)
--- 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);