X-Git-Url: https://git.uis.cam.ac.uk/x/uis/git/git.git/blobdiff_plain/7906af0cb84c8e65656347909abd4e22b04d1c1e..e36adf712251a19bd2ada0016764d340dfcf2ba0:/strbuf.h diff --git a/strbuf.h b/strbuf.h index 8f8fe01e68..c8d98dfb95 100644 --- a/strbuf.h +++ b/strbuf.h @@ -336,6 +336,14 @@ void strbuf_expand(struct strbuf *sb, expand_fn_t fn, void *context); +/** + * Used as callback for `strbuf_expand` to only expand literals + * (i.e. %n and %xNN). The context argument is ignored. + */ +size_t strbuf_expand_literal_cb(struct strbuf *sb, + const char *placeholder, + void *context); + /** * Used as callback for `strbuf_expand()`, expects an array of * struct strbuf_expand_dict_entry as context, i.e. pairs of