From ef8d7ac42a6a62d678166fe25ea743315809d2bb Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 28 Jul 2020 16:24:53 -0400 Subject: strvec: convert more 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 remaining files from the first half of the alphabet, 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 '[abcdefghjkl]*'". We'll deal with any indentation/style fallouts separately. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- exec-cmd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'exec-cmd.c') diff --git a/exec-cmd.c b/exec-cmd.c index bb24c2f3bc..0f8e888424 100644 --- a/exec-cmd.c +++ b/exec-cmd.c @@ -320,16 +320,16 @@ void setup_path(void) strbuf_release(&new_path); } -const char **prepare_git_cmd(struct argv_array *out, const char **argv) +const char **prepare_git_cmd(struct strvec *out, const char **argv) { - argv_array_push(out, "git"); - argv_array_pushv(out, argv); + strvec_push(out, "git"); + strvec_pushv(out, argv); return out->argv; } int execv_git_cmd(const char **argv) { - struct argv_array nargv = ARGV_ARRAY_INIT; + struct strvec nargv = STRVEC_INIT; prepare_git_cmd(&nargv, argv); trace_argv_printf(nargv.argv, "trace: exec:"); @@ -339,7 +339,7 @@ int execv_git_cmd(const char **argv) trace_printf("trace: exec failed: %s\n", strerror(errno)); - argv_array_clear(&nargv); + strvec_clear(&nargv); return -1; } -- cgit v1.3