summaryrefslogtreecommitdiff
path: root/exec_cmd.h
diff options
context:
space:
mode:
authorSteffen Prohaska <prohaska@zib.de>2008-07-28 05:50:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-07-29 06:02:11 (GMT)
commit4933e5ebdefdb88841275132ef358e6649963751 (patch)
tree70b8403dfb2f6deec529192d343dd61f485c08e5 /exec_cmd.h
parentd2761895144b6fabcbe1f3bd40d6c6798914b518 (diff)
downloadgit-4933e5ebdefdb88841275132ef358e6649963751.zip
git-4933e5ebdefdb88841275132ef358e6649963751.tar.gz
git-4933e5ebdefdb88841275132ef358e6649963751.tar.bz2
Refactor, adding prepare_git_cmd(const char **argv)
prepare_git_cmd(const char **argv) adds a first entry "git" to the array argv. The new array is allocated on the heap. It's the caller's responsibility to release it with free(). The code was already present in execv_git_cmd() but could not be used from outside. Now it can also be called for preparing the command list in the MinGW codepath in run-command.c. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'exec_cmd.h')
-rw-r--r--exec_cmd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/exec_cmd.h b/exec_cmd.h
index 0c46cd5..594f961 100644
--- a/exec_cmd.h
+++ b/exec_cmd.h
@@ -5,6 +5,7 @@ extern void git_set_argv_exec_path(const char *exec_path);
extern void git_set_argv0_path(const char *path);
extern const char* git_exec_path(void);
extern void setup_path(void);
+extern const char **prepare_git_cmd(const char **argv);
extern int execv_git_cmd(const char **argv); /* NULL terminated */
extern int execl_git_cmd(const char *cmd, ...);
extern const char *system_path(const char *path);