summaryrefslogtreecommitdiff
path: root/parse-options-cb.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-07-28 16:25:12 -0400
committerJunio C Hamano <gitster@pobox.com>2020-07-28 15:02:18 -0700
commitc972bf4cf546a56fe1c54ddde1d33ebb9f454a0f (patch)
tree3a97c304c0e0ed4656cc5049ba44b4eb26e87a16 /parse-options-cb.c
parentef8d7ac42a6a62d678166fe25ea743315809d2bb (diff)
downloadgit-c972bf4cf546a56fe1c54ddde1d33ebb9f454a0f.tar.gz
strvec: convert remaining 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 all of the remaining files, as the resulting diff is reasonably sized. 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; ' 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 'parse-options-cb.c')
-rw-r--r--parse-options-cb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/parse-options-cb.c b/parse-options-cb.c
index 7cba96454c..d9d3b0819f 100644
--- a/parse-options-cb.c
+++ b/parse-options-cb.c
@@ -275,19 +275,19 @@ int parse_opt_passthru(const struct option *opt, const char *arg, int unset)
/**
* For an option opt, recreate the command-line option, appending it to
- * opt->value which must be a argv_array. This is useful when we need to pass
+ * opt->value which must be a strvec. This is useful when we need to pass
* the command-line option, which can be specified multiple times, to another
* command.
*/
int parse_opt_passthru_argv(const struct option *opt, const char *arg, int unset)
{
static struct strbuf sb = STRBUF_INIT;
- struct argv_array *opt_value = opt->value;
+ struct strvec *opt_value = opt->value;
if (recreate_opt(&sb, opt, arg, unset) < 0)
return -1;
- argv_array_push(opt_value, sb.buf);
+ strvec_push(opt_value, sb.buf);
return 0;
}