Skip to content
  • René Scharfe's avatar
    add strbuf_expand_dict_cb(), a helper for simple cases · 9b864e73
    René Scharfe authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    The new callback function strbuf_expand_dict_cb() can be used together
    with strbuf_expand() if there is only a small number of placeholders
    for static replacement texts.  It expects its dictionary as an array of
    placeholder+value pairs as context parameter, terminated by an entry
    with the placeholder member set to NULL.
    
    The new helper is intended to aid converting the remaining calls of
    interpolate().  strbuf_expand() is smaller, more flexible and can be
    used to go faster than interpolate(), so it should replace the latter.
    
    Signed-off-by: default avatarRene Scharfe <rene.scharfe@lsrfire.ath.cx>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    9b864e73