diff options
author | Jeff King <peff@peff.net> | 2020-07-28 16:24:27 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-07-28 15:02:18 -0700 |
commit | 22f9b7f3f59549735a480042a4b9ce292eedfae0 (patch) | |
tree | af564ca6084c9790ea99dd60291d7aa9f854fecb /builtin/show-branch.c | |
parent | quote: rename sq_dequote_to_argv_array to mention strvec (diff) | |
download | tgif-22f9b7f3f59549735a480042a4b9ce292eedfae0.tar.xz |
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/show-branch.c')
-rw-r--r-- | builtin/show-branch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/show-branch.c b/builtin/show-branch.c index f0a70538c3..4c918ce90d 100644 --- a/builtin/show-branch.c +++ b/builtin/show-branch.c @@ -20,7 +20,7 @@ static const char* show_branch_usage[] = { static int showbranch_use_color = -1; -static struct argv_array default_args = ARGV_ARRAY_INIT; +static struct strvec default_args = STRVEC_INIT; /* * TODO: convert this use of commit->object.flags to commit-slab @@ -562,8 +562,8 @@ static int git_show_branch_config(const char *var, const char *value, void *cb) * mimic the real argv a bit better. */ if (!default_args.argc) - argv_array_push(&default_args, "show-branch"); - argv_array_push(&default_args, value); + strvec_push(&default_args, "show-branch"); + strvec_push(&default_args, value); return 0; } |