]> git.ipfire.org Git - thirdparty/git.git/blobdiff - strbuf.h
--pretty=format: on-demand format expansion
[thirdparty/git.git] / strbuf.h
index cd7f295b65237aaa1f4e4031482af43cbe9d9115..21d894415440094997fb71788b7ec8aa53ad2b73 100644 (file)
--- a/strbuf.h
+++ b/strbuf.h
@@ -102,6 +102,9 @@ static inline void strbuf_addbuf(struct strbuf *sb, struct strbuf *sb2) {
        strbuf_add(sb, sb2->buf, sb2->len);
 }
 
+typedef void (*expand_fn_t) (struct strbuf *sb, const char *placeholder, void *context);
+extern void strbuf_expand(struct strbuf *sb, const char *format, const char **placeholders, expand_fn_t fn, void *context);
+
 __attribute__((format(printf,2,3)))
 extern void strbuf_addf(struct strbuf *sb, const char *fmt, ...);