aboutsummaryrefslogtreecommitdiffstats
path: root/run-command.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-07-28 16:25:12 -0400
committerJunio C Hamano <gitster@pobox.com>2020-07-28 15:02:18 -0700
commitc972bf4cf546a56fe1c54ddde1d33ebb9f454a0f (patch)
tree3a97c304c0e0ed4656cc5049ba44b4eb26e87a16 /run-command.h
parentef8d7ac42a6a62d678166fe25ea743315809d2bb (diff)
downloadgit-c972bf4cf546a56fe1c54ddde1d33ebb9f454a0f.tar.gz
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'run-command.h')
-rw-r--r--run-command.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/run-command.h b/run-command.h
index f5e05d38d2..8b9bfaef16 100644
--- a/run-command.h
+++ b/run-command.h
@@ -52,15 +52,15 @@ struct child_process {
* Note that the ownership of the memory pointed to by .argv stays with the
* caller, but it should survive until `finish_command` completes. If the
* .argv member is NULL, `start_command` will point it at the .args
- * `argv_array` (so you may use one or the other, but you must use exactly
+ * `strvec` (so you may use one or the other, but you must use exactly
* one). The memory in .args will be cleaned up automatically during
* `finish_command` (or during `start_command` when it is unsuccessful).
*
*/
const char **argv;
- struct argv_array args;
- struct argv_array env_array;
+ struct strvec args;
+ struct strvec env_array;
pid_t pid;
int trace2_child_id;
@@ -107,7 +107,7 @@ struct child_process {
* variable that will be removed from the child process's environment.
*
* If the .env member is NULL, `start_command` will point it at the
- * .env_array `argv_array` (so you may use one or the other, but not both).
+ * .env_array `strvec` (so you may use one or the other, but not both).
* The memory in .env_array will be cleaned up automatically during
* `finish_command` (or during `start_command` when it is unsuccessful).
*/
@@ -134,7 +134,7 @@ struct child_process {
void *clean_on_exit_handler_cbdata;
};
-#define CHILD_PROCESS_INIT { NULL, ARGV_ARRAY_INIT, ARGV_ARRAY_INIT }
+#define CHILD_PROCESS_INIT { NULL, STRVEC_INIT, STRVEC_INIT }
/**
* The functions: child_process_init, start_command, finish_command,