http-push: use strbuf instead of fwrite_buffer
authorJeff King <peff@peff.net>
Thu, 24 Sep 2015 21:07:29 +0000 (17:07 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 25 Sep 2015 17:18:18 +0000 (10:18 -0700)
commit7d0581a9abe733d8880113370c4d956b50f5bd9f
tree9026279b75fbfef9019be1a24138ec1b54a74444
parentdf1ed03a6fabf58b63b26950c71d36eff4aa25e8
http-push: use strbuf instead of fwrite_buffer

The http-push code defines an fwrite_buffer function for use
as a curl callback; it just writes to a strbuf. There's no
reason we need to use it ourselves, as we know we have a
strbuf. This lets us format directly into it, rather than
dealing with an extra temporary buffer (which required
manual length computation).

While we're here, let's also remove the literal tabs from
the source in favor of "\t", which is more visually obvious.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http-push.c