merge-recursive: eliminate flush_buffer() in favor of write_in_full()
authorThomas Rast <trast@student.ethz.ch>
Fri, 3 Aug 2012 12:16:25 +0000 (14:16 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 3 Aug 2012 19:13:43 +0000 (12:13 -0700)
commitf633ea2c736a2a38e92fcf61e90c8adadc5c504d
treee92dee05f75ed994ea95322cc9dfcb75cc8c6aa0
parentd0f1ea6003d97e63110fa7d50bb07f546a909b6e
merge-recursive: eliminate flush_buffer() in favor of write_in_full()

flush_buffer() is a thin wrapper around write_in_full() with two very
confusing properties:

* It runs a loop to handle short reads, ensuring that we write
  everything.  But that is precisely what write_in_full() does!

* It checks for a return value of 0 from write_in_full(), which cannot
  happen: it returns this value only if count=0, but flush_buffer()
  will never call write_in_full() in this case.

Remove it.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge-recursive.c