summaryrefslogtreecommitdiff
path: root/help.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-01-04 10:03:56 -0800
committerJunio C Hamano <gitster@pobox.com>2017-01-08 18:04:17 -0800
commit2ec87741b2d2935542b13d407fbeedbe0a7af094 (patch)
tree71bfcf5ab7008e8560f1c8e0b54419d3596be925 /help.c
parent454cb6bd52a4de614a3633e4f547af03d5c3b640 (diff)
downloadgit-2ec87741b2d2935542b13d407fbeedbe0a7af094.tar.gz
mv: remove use of deprecated 'get_pathspec()'
Convert the 'internal_copy_pathspec()' function to 'prefix_path()' instead of using the deprecated 'get_pathspec()' interface. Also, rename 'internal_copy_pathspec()' to 'internal_prefix_pathspec()' to be more descriptive of what the funciton is actually doing. In addition to this, fix a memory leak caused by only duplicating some of the pathspec elements. Instead always duplicate all of the the pathspec elements as an intermediate step (with modificationed based on the passed in flags). This way the intermediate strings can then be freed after getting the result from 'prefix_path()'. Signed-off-by: Brandon Williams <bmwill@google.com> Reviewed-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'help.c')
0 files changed, 0 insertions, 0 deletions