Skip to content
  • Jeff King's avatar
    prefix_filename: drop length parameter · 116fb64e
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    This function takes the prefix as a ptr/len pair, but in
    every caller the length is exactly strlen(ptr). Let's
    simplify the interface and just take the string. This saves
    callers specifying it (and in some cases handling a NULL
    prefix).
    
    In a handful of cases we had the length already without
    calling strlen, so this is technically slower. But it's not
    likely to matter (after all, if the prefix is non-empty
    we'll allocate and copy it into a buffer anyway).
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    116fb64e