Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-07-28 23:24:53 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-29 01:02:18 +0300
commitef8d7ac42a6a62d678166fe25ea743315809d2bb (patch)
tree41974632658fdc804d42d3c98859bd8f259828c8 /line-log.c
parent22f9b7f3f59549735a480042a4b9ce292eedfae0 (diff)
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'line-log.c')
-rw-r--r--line-log.c6
1 files changed, 3 insertions, 3 deletions
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 */