]> git.ipfire.org Git - thirdparty/git.git/commit
quote: drop sq_dequote_to_argv()
authorJeff King <peff@peff.net>
Tue, 19 May 2026 01:19:34 +0000 (21:19 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 May 2026 03:14:03 +0000 (12:14 +0900)
commitc5f52d03e223e1ea0c4639d22ad1ca180ec85097
tree2ec2c71c78a9fe2b652588c57c981a72a8dccd8e
parent6a1964c22a2655a4c995d9a8bbf25512b1a2bc16
quote: drop sq_dequote_to_argv()

The last caller went away in f9dbb64fad (config: parse more robust
format in GIT_CONFIG_PARAMETERS, 2021-01-12), when we switched to using
sq_dequote_step().

The "to_argv()" form is not a great interface. If you care about raw
speed, then sq_dequote_step() lets you work incrementally without extra
allocations. If you care about simplicity, then sq_dequote_to_strvec()
puts the result in an encapsulated data structure. With sq_dequote_to_argv(),
you have a data dependency on the original string but still have to
remember to manually free the argv array itself (but not its elements).

So it's sort of a worst-of-both-worlds middle ground. Let's get rid of
it.

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