• Jeff King's avatar
    prefix_filename: drop length parameter · 116fb64e
    Jeff King authored
    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
    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: 's avatarJeff King <peff@peff.net>
    Signed-off-by: 's avatarJunio C Hamano <gitster@pobox.com>
worktree.c 10.1 KB