summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2024-05-30 02:46:38 -0400
committerJunio C Hamano <gitster@pobox.com>2024-05-30 08:55:29 -0700
commit64f8502b40affcb4c956c511fef7e704a88b0e25 (patch)
tree72837aa27b50c7a1457b59d0e2ae64e89686e40c /commit.c
parentd58a687705d3920464c786b4f7b837d620f8d8b1 (diff)
mv: replace src_dir with a strvec
We manually manage the src_dir array with ALLOC_GROW. Using a strvec is a little more ergonomic, and makes the memory ownership more clear. It does mean that we copy the strings (which were otherwise just pointers into the "sources" strvec), but using the same rationale as 9fcd9e4e72 (builtin/mv duplicate string list memory, 2024-05-27), it's just not enough to be worth worrying about here. As a bonus, this gets rid of some "int"s used for allocation management (though in practice these were limited to command-line sizes and thus not overflowable). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions