]> git.ipfire.org Git - thirdparty/git.git/commit - quote.c
quote: provide sq_dequote_to_argv_array
authorJeff King <peff@peff.net>
Tue, 13 Sep 2011 21:58:08 +0000 (17:58 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Sep 2011 18:56:49 +0000 (11:56 -0700)
commit37e8161a04360d01edd0611135f5eae8e6a08224
treeea38f9230e77827e445d409eb4c9ea6706cb8adc
parentc1189caeaf726e6c16c8bca7da8bf0b243da478d
quote: provide sq_dequote_to_argv_array

This is similar to sq_dequote_to_argv, but more convenient
if you have an argv_array. It's tempting to just feed the
components of the argv_array to sq_dequote_to_argv instead,
but:

  1. It wouldn't maintain the NULL-termination invariant
     of argv_array.

  2. It doesn't match the memory ownership policy of
     argv_array (in which each component is free-able, not a
     pointer into a separate buffer).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
quote.c
quote.h