diff options
author | Jeff King <peff@peff.net> | 2020-07-28 16:25:12 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-07-28 15:02:18 -0700 |
commit | c972bf4cf546a56fe1c54ddde1d33ebb9f454a0f (patch) | |
tree | 3a97c304c0e0ed4656cc5049ba44b4eb26e87a16 /midx.c | |
parent | ef8d7ac42a6a62d678166fe25ea743315809d2bb (diff) | |
download | git-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 'midx.c')
-rw-r--r-- | midx.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1408,21 +1408,21 @@ int midx_repack(struct repository *r, const char *object_dir, size_t batch_size, repo_config_get_bool(r, "repack.usedeltabaseoffset", &delta_base_offset); repo_config_get_bool(r, "repack.usedeltaislands", &use_delta_islands); - argv_array_push(&cmd.args, "pack-objects"); + strvec_push(&cmd.args, "pack-objects"); strbuf_addstr(&base_name, object_dir); strbuf_addstr(&base_name, "/pack/pack"); - argv_array_push(&cmd.args, base_name.buf); + strvec_push(&cmd.args, base_name.buf); if (delta_base_offset) - argv_array_push(&cmd.args, "--delta-base-offset"); + strvec_push(&cmd.args, "--delta-base-offset"); if (use_delta_islands) - argv_array_push(&cmd.args, "--delta-islands"); + strvec_push(&cmd.args, "--delta-islands"); if (flags & MIDX_PROGRESS) - argv_array_push(&cmd.args, "--progress"); + strvec_push(&cmd.args, "--progress"); else - argv_array_push(&cmd.args, "-q"); + strvec_push(&cmd.args, "-q"); strbuf_release(&base_name); |