diff options
author | 2017-09-20 16:36:59 -0400 | |
---|---|---|
committer | 2017-09-21 13:09:46 +0900 | |
commit | 7fa3c2ad6d06428dcbd801ced55dffd22027cc96 (patch) | |
tree | 87c6e882ddb3bafe97eace6ca64ee08acac818b3 /Documentation/gitmodules.txt | |
parent | The eighth batch for 2.15 (diff) | |
download | tgif-7fa3c2ad6d06428dcbd801ced55dffd22027cc96.tar.xz |
revision: replace "struct cmdline_pathspec" with argv_array
We assemble an array of strings in a custom struct,
NULL-terminate the result, and then pass it to
parse_pathspec().
But then we never free the array or the individual strings
(nor can we do the latter, as they are heap-allocated when
they come from stdin but not when they come from the
passed-in argv).
Let's swap this out for an argv_array. It does the same
thing with fewer lines of code, and it's safe to call
argv_array_clear() at the end to avoid a memory leak.
Reported-by: Martin Ă…gren <martin.agren@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/gitmodules.txt')
0 files changed, 0 insertions, 0 deletions