Please sign in to comment.
strbuf: add strbuf_vaddf
In a variable-args function, the code for writing into a strbuf is non-trivial. We ended up cutting and pasting it in several places because there was no vprintf-style function for strbufs (which in turn was held up by a lack of va_copy). Now that we have a fallback va_copy, we can add strbuf_vaddf, the strbuf equivalent of vsprintf. And we can clean up the cut and paste mess. Signed-off-by: Jeff King <email@example.com> Improved-by: Christian Couder <firstname.lastname@example.org> Signed-off-by: Jonathan Nieder <email@example.com> Signed-off-by: Junio C Hamano <firstname.lastname@example.org>
- Loading branch information...
Showing with 25 additions and 63 deletions.