Mark Levedahl [off-list ref] writes:
git-bundle create on cygwin was nearly unusable due to 1 character
at a time (unbuffered) reading from an exec'ed process.
Gaah, well spotted. I was wondering what that 20x difference
was, but did not notice that read_string() thing.
That function is probably sometimes necessary if you are reading
from a non-seekable fd and need to stop immediately after
reading the header (so that you can hand the rest to pack
handling code), but it really should be the last-ditch thing to
read one-byte-at-a-time.
Also, I even suspect that we are always reading from a seekable
bundle file in this program and it should be able to use
buffered input with seeking back as needed after you read
enough.