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:
authorRené Scharfe <l.s.r@web.de>2022-10-30 14:55:06 +0300
committerTaylor Blau <me@ttaylorr.com>2022-10-30 21:04:51 +0300
commitddbb47fde9b6d8cd9f3728847a378f634318cfb1 (patch)
treeef093554b4ce4914edb7a0a0ace39187347bb344 /run-command.h
parentef249b398e26dd76f473ce83a35219c520f6fdbe (diff)
replace and remove run_command_v_opt()
Replace the remaining calls of run_command_v_opt() with run_command() calls and explict struct child_process variables. This is more verbose, but not by much overall. The code becomes more flexible, e.g. it's easy to extend to conditionally add a new argument. Then remove the now unused function and its own flag names, simplifying the run-command API. Suggested-by: Jeff King <peff@peff.net> Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Taylor Blau <me@ttaylorr.com>
Diffstat (limited to 'run-command.h')
-rw-r--r--run-command.h23
1 files changed, 1 insertions, 22 deletions
diff --git a/run-command.h b/run-command.h
index 63ed6e18ff..41cc8470dc 100644
--- a/run-command.h
+++ b/run-command.h
@@ -150,8 +150,7 @@ struct child_process {
}
/**
- * The functions: start_command, finish_command, run_command,
- * run_command_v_opt do the following:
+ * The functions: start_command, finish_command, run_command do the following:
*
* - If a system call failed, errno is set and -1 is returned. A diagnostic
* is printed.
@@ -223,26 +222,6 @@ int run_command(struct child_process *);
*/
int run_auto_maintenance(int quiet);
-#define RUN_COMMAND_NO_STDIN (1<<0)
-#define RUN_GIT_CMD (1<<1)
-#define RUN_COMMAND_STDOUT_TO_STDERR (1<<2)
-#define RUN_SILENT_EXEC_FAILURE (1<<3)
-#define RUN_USING_SHELL (1<<4)
-#define RUN_CLEAN_ON_EXIT (1<<5)
-#define RUN_WAIT_AFTER_CLEAN (1<<6)
-#define RUN_CLOSE_OBJECT_STORE (1<<7)
-
-/**
- * Convenience function that encapsulates a sequence of
- * start_command() followed by finish_command(). The argument argv
- * specifies the program and its arguments. The argument opt is zero
- * or more of the flags `RUN_COMMAND_NO_STDIN`, `RUN_GIT_CMD`,
- * `RUN_COMMAND_STDOUT_TO_STDERR`, or `RUN_SILENT_EXEC_FAILURE`
- * that correspond to the members .no_stdin, .git_cmd,
- * .stdout_to_stderr, .silent_exec_failure of `struct child_process`.
- */
-int run_command_v_opt(const char **argv, int opt);
-
/**
* Execute the given command, sending "in" to its stdin, and capturing its
* stdout and stderr in the "out" and "err" strbufs. Any of the three may