Skip to content
  • Jeff King's avatar
    strbuf: add fixed-length version of add_wrapped_text · 98acc837
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    The function strbuf_add_wrapped_text takes a NUL-terminated
    string. This makes it annoying to wrap strings we have as a
    pointer and a length.
    
    Refactoring strbuf_add_wrapped_text and all of its
    sub-functions to handle fixed-length strings turned out to
    be really ugly. So this implementation is lame; it just
    strdups the text and operates on the NUL-terminated version.
    This should be fine as the strings we are wrapping are
    generally pretty short.  If it becomes a problem, we can
    optimize later.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    98acc837