pub fn write_flush(output: &mut impl Write) -> Result<()>
Writes a flush and pushes everything out.
The flush is useless if it sits in a buffer: git is waiting for it before it will say anything else, so this is where a missing flush turns into a hang.
Error::Io on a write failure.
Error::Io