Skip to content
  • Jeff King's avatar
    argv-array: add detach function · b992657e
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    b992657e