summaryrefslogtreecommitdiff
path: root/strbuf.h
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2010-01-13 12:36:42 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-01-14 09:25:15 -0800
commit361df5df77255321b2ca409d892b4c24b7b0441d (patch)
treef4896a9a959d1a026cccb01aa6568c4522e8278c /strbuf.h
parentstrbuf_expand: convert "%%" to "%" (diff)
downloadtgif-361df5df77255321b2ca409d892b4c24b7b0441d.tar.xz
strbuf: add strbuf_addbuf_percentquote
This is handy for creating strings which will be fed to printf() or strbuf_expand(). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'strbuf.h')
-rw-r--r--strbuf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/strbuf.h b/strbuf.h
index fa07ecf094..84ac9424b5 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -116,6 +116,7 @@ struct strbuf_expand_dict_entry {
const char *value;
};
extern size_t strbuf_expand_dict_cb(struct strbuf *sb, const char *placeholder, void *context);
+extern void strbuf_addbuf_percentquote(struct strbuf *dst, const struct strbuf *src);
__attribute__((format (printf,2,3)))
extern void strbuf_addf(struct strbuf *sb, const char *fmt, ...);