Skip to content

Commit

Permalink
run_external_diff: drop fflush(NULL)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Apr 21, 2014
1 parent 89294d1 commit 5b88caa
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5b88caa

Please sign in to comment.