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:27 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-29 01:02:18 +0300
commit22f9b7f3f59549735a480042a4b9ce292eedfae0 (patch)
treeaf564ca6084c9790ea99dd60291d7aa9f854fecb /builtin/bundle.c
parent2745b6b4505ae11d6821c1d451169727b558a079 (diff)
strvec: convert builtin/ 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 files in builtin/ 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 builtin/". 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 'builtin/bundle.c')
-rw-r--r--builtin/bundle.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/builtin/bundle.c b/builtin/bundle.c
index 51fc6d9739..750630bdd9 100644
--- a/builtin/bundle.c
+++ b/builtin/bundle.c
@@ -59,7 +59,7 @@ static int parse_options_cmd_bundle(int argc,
static int cmd_bundle_create(int argc, const char **argv, const char *prefix) {
int all_progress_implied = 0;
int progress = isatty(STDERR_FILENO);
- struct argv_array pack_opts;
+ struct strvec pack_opts;
struct option options[] = {
OPT_SET_INT('q', "quiet", &progress,
@@ -79,15 +79,15 @@ static int cmd_bundle_create(int argc, const char **argv, const char *prefix) {
builtin_bundle_create_usage, options, &bundle_file);
/* bundle internals use argv[1] as further parameters */
- argv_array_init(&pack_opts);
+ strvec_init(&pack_opts);
if (progress == 0)
- argv_array_push(&pack_opts, "--quiet");
+ strvec_push(&pack_opts, "--quiet");
else if (progress == 1)
- argv_array_push(&pack_opts, "--progress");
+ strvec_push(&pack_opts, "--progress");
else if (progress == 2)
- argv_array_push(&pack_opts, "--all-progress");
+ strvec_push(&pack_opts, "--all-progress");
if (progress && all_progress_implied)
- argv_array_push(&pack_opts, "--all-progress-implied");
+ strvec_push(&pack_opts, "--all-progress-implied");
if (!startup_info->have_repository)
die(_("Need a repository to create a bundle."));