From ef8d7ac42a6a62d678166fe25ea743315809d2bb Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 28 Jul 2020 16:24:53 -0400 Subject: strvec: convert more callers away from argv_array name We eventually want to drop the argv_array name and just use strvec consistently. There's no particular reason we have to do it all at once, or care about interactions between converted and unconverted bits. Because of our preprocessor compat layer, the names are interchangeable to the compiler (so even a definition and declaration using different names is OK). This patch converts remaining files from the first half of the alphabet, to keep the diff to a manageable size. The conversion was done purely mechanically with: git ls-files '*.c' '*.h' | xargs perl -i -pe ' s/ARGV_ARRAY/STRVEC/g; s/argv_array/strvec/g; ' and then selectively staging files with "git add '[abcdefghjkl]*'". We'll deal with any indentation/style fallouts separately. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- line-log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'line-log.c') diff --git a/line-log.c b/line-log.c index 05d077b8e7..bf73ea95ac 100644 --- a/line-log.c +++ b/line-log.c @@ -758,12 +758,12 @@ static void parse_pathspec_from_ranges(struct pathspec *pathspec, struct line_log_data *range) { struct line_log_data *r; - struct argv_array array = ARGV_ARRAY_INIT; + struct strvec array = STRVEC_INIT; const char **paths; for (r = range; r; r = r->next) - argv_array_push(&array, r->path); - paths = argv_array_detach(&array); + strvec_push(&array, r->path); + paths = strvec_detach(&array); parse_pathspec(pathspec, 0, PATHSPEC_PREFER_FULL, "", paths); /* strings are now owned by pathspec */ -- cgit v1.2.3