Thread (31 messages) flat view 31 messages, 8 authors, 2016-06-15

Re: [PATCH 2/3] strbuf: add strbuf_percentquote_buf

From: Jeff King <hidden>
Date: 2016-06-15 22:48:00

On Tue, Jan 12, 2010 at 05:19:21PM +0100, Johannes Schindelin wrote:
quoted
This is handy for creating strings which will be fed to
strbuf_expand or printf.
For printf(), there is always %s%s, so I would not say your patch is 
useful there, but rather adds churn: first you add a percent, then you 
strip it away again.
True. It is only useful in either case if you are going to pass the
format specifier through an API that does all of its work at once (e.g.,
in this instance, I would be happy to simply output my strings at the
right moment, but I need to get them _between_ the log format and the
diff summary, which means I need to hide them in the log format
specifier). That tends not to happen with printf-style strings, since we
don't build complex APIs around them.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help