Subject: Re: [PATCH] refs: write packed_refs file using stdio

From: Jeff King <[email-masked]>
Date: Wed, 10 Sep 2014 15:14:54 -0400

On Wed, Sep 10, 2014 at 07:32:17AM -0700, Ronnie Sahlberg wrote:

> Even better could be to build an iovec for all the data and use writev() ?
> (now without gmail adding formatting)

I'm not sure that would make anything easier. We're literally
sprintf-ing (and calling sha1_to_hex) into a buffer so we can write()
it. That seems like a solid case for using fprintf instead.

We can't just writev() a bunch of buffers we have already. We'd
literally have to make an array of buffers to format into. It's much
simpler (and probably faster) to just format directly into stdio's
buffers.

-Peff