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:53 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-29 01:02:18 +0300
commitef8d7ac42a6a62d678166fe25ea743315809d2bb (patch)
tree41974632658fdc804d42d3c98859bd8f259828c8 /exec-cmd.c
parent22f9b7f3f59549735a480042a4b9ce292eedfae0 (diff)
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'exec-cmd.c')
-rw-r--r--exec-cmd.c10
1 files changed, 5 insertions, 5 deletions
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;
}