summaryrefslogtreecommitdiff
path: root/builtin/annotate.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-07-28 16:24:27 -0400
committerJunio C Hamano <gitster@pobox.com>2020-07-28 15:02:18 -0700
commit22f9b7f3f59549735a480042a4b9ce292eedfae0 (patch)
treeaf564ca6084c9790ea99dd60291d7aa9f854fecb /builtin/annotate.c
parent2745b6b4505ae11d6821c1d451169727b558a079 (diff)
downloadgit-22f9b7f3f59549735a480042a4b9ce292eedfae0.tar.gz
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/annotate.c')
-rw-r--r--builtin/annotate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/annotate.c b/builtin/annotate.c
index 4353448712..7b7ecd366d 100644
--- a/builtin/annotate.c
+++ b/builtin/annotate.c
@@ -9,13 +9,13 @@
int cmd_annotate(int argc, const char **argv, const char *prefix)
{
- struct argv_array args = ARGV_ARRAY_INIT;
+ struct strvec args = STRVEC_INIT;
int i;
- argv_array_pushl(&args, "annotate", "-c", NULL);
+ strvec_pushl(&args, "annotate", "-c", NULL);
for (i = 1; i < argc; i++) {
- argv_array_push(&args, argv[i]);
+ strvec_push(&args, argv[i]);
}
return cmd_blame(args.argc, args.argv, prefix);