• Jeff King's avatar
    argv-array: add detach function · b992657e
    Jeff King authored
    The usual pattern for an argv array is to initialize it,
    push in some strings, and then clear it when done. Very
    occasionally, though, we must do other exotic things with
    the memory, like freeing the list but keeping the strings.
    Let's provide a detach function so that callers can make use
    of our API to build up the array, and then take ownership of
    it.
    Signed-off-by: 's avatarJeff King <peff@peff.net>
    Signed-off-by: 's avatarJunio C Hamano <gitster@pobox.com>
    b992657e
argv-array.c 1.74 KB