From c972bf4cf546a56fe1c54ddde1d33ebb9f454a0f Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 28 Jul 2020 16:25:12 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- pager.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pager.c') diff --git a/pager.c b/pager.c index 41446d4f05..ee435de675 100644 --- a/pager.c +++ b/pager.c @@ -68,7 +68,7 @@ const char *git_pager(int stdout_is_tty) return pager; } -static void setup_pager_env(struct argv_array *env) +static void setup_pager_env(struct strvec *env) { const char **argv; int i; @@ -88,7 +88,7 @@ static void setup_pager_env(struct argv_array *env) *cp = '\0'; if (!getenv(argv[i])) { *cp = '='; - argv_array_push(env, argv[i]); + strvec_push(env, argv[i]); } } free(pager_env); @@ -97,7 +97,7 @@ static void setup_pager_env(struct argv_array *env) void prepare_pager_args(struct child_process *pager_process, const char *pager) { - argv_array_push(&pager_process->args, pager); + strvec_push(&pager_process->args, pager); pager_process->use_shell = 1; setup_pager_env(&pager_process->env_array); pager_process->trace2_child_class = "pager"; @@ -126,7 +126,7 @@ void setup_pager(void) /* spawn the pager */ prepare_pager_args(&pager_process, pager); pager_process.in = -1; - argv_array_push(&pager_process.env_array, "GIT_PAGER_IN_USE"); + strvec_push(&pager_process.env_array, "GIT_PAGER_IN_USE"); if (start_command(&pager_process)) return; -- cgit v1.2.3