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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 12, 2010 at 05:19:21PM +0100, Johannes Schindelin wrote:

> > 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]