summaryrefslogtreecommitdiff
path: root/t/unit-tests/u-string-list.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2025-09-19 18:50:48 -0400
committerJunio C Hamano <gitster@pobox.com>2025-09-22 14:27:03 -0700
commit18068139f2d0fc2aa82f34f2c177d781e228e732 (patch)
tree99e1daf81cad25ffd28df6e406ecc690d89ef371 /t/unit-tests/u-string-list.c
parentb553332f82440d68710fcfd2dd6718ec5b43f841 (diff)
treewide: pass strvecs around for setup_revisions_from_strvec()
The previous commit converted callers of setup_revisions() with a strvec to use the safer and easier _from_strvec() variant. Let's now convert spots that don't directly have a strvec, but receive an argc/argv pair that eventually comes from one. We'll instead pass the strvec down to the point where we call setup_revisions(). That makes these functions slightly less flexible if they were to grow other callers that don't use strvecs, but this rigidity is buying us some safety. It is only safe to pass the free_removed_argv_elements option to setup_revisions() if we know the elements of argv/argc are allocated on the heap. That isn't communicated in the type system when we are passed the bare elements. But if we get a strvec, we know that the elements are allocated strings. And at any rate, each of these modified functions has only a single caller (that has a strvec), so the loss of flexibility is unlikely to ever matter. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests/u-string-list.c')
0 files changed, 0 insertions, 0 deletions