From 7996ff335e675b229398974f6cbf459843c9bf6d Mon Sep 17 00:00:00 2001 From: Nanako Shiraishi Date: Thu, 2 Oct 2008 19:14:25 +0900 Subject: [PATCH] run-command.c: remove run_command_v_opt_cd() This function is not used anywhere. Johannes Sixt : > Future callers can use run_command_v_opt_cd_env() instead. Signed-off-by: Nanako Shiraishi Signed-off-by: Shawn O. Pearce --- Documentation/technical/api-run-command.txt | 2 +- run-command.c | 8 -------- run-command.h | 1 - 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Documentation/technical/api-run-command.txt b/Documentation/technical/api-run-command.txt index 75aa5d492..82e9e831b 100644 --- a/Documentation/technical/api-run-command.txt +++ b/Documentation/technical/api-run-command.txt @@ -30,7 +30,7 @@ Functions start_command() followed by finish_command(). Takes a pointer to a `struct child_process` that specifies the details. -`run_command_v_opt`, `run_command_v_opt_cd`, `run_command_v_opt_cd_env`:: +`run_command_v_opt`, `run_command_v_opt_cd_env`:: Convenience functions that encapsulate a sequence of start_command() followed by finish_command(). The argument argv diff --git a/run-command.c b/run-command.c index caab37457..c90cdc50e 100644 --- a/run-command.c +++ b/run-command.c @@ -273,14 +273,6 @@ int run_command_v_opt(const char **argv, int opt) return run_command(&cmd); } -int run_command_v_opt_cd(const char **argv, int opt, const char *dir) -{ - struct child_process cmd; - prepare_run_command_v_opt(&cmd, argv, opt); - cmd.dir = dir; - return run_command(&cmd); -} - int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const char *const *env) { struct child_process cmd; diff --git a/run-command.h b/run-command.h index 4f2b7d7d4..a8b0c209e 100644 --- a/run-command.h +++ b/run-command.h @@ -53,7 +53,6 @@ int run_command(struct child_process *); #define RUN_GIT_CMD 2 /*If this is to be git sub-command */ #define RUN_COMMAND_STDOUT_TO_STDERR 4 int run_command_v_opt(const char **argv, int opt); -int run_command_v_opt_cd(const char **argv, int opt, const char *dir); /* * env (the environment) is to be formatted like environ: "VAR=VALUE". -- 2.30.2