author | Alex Riesen <raa.lkml@gmail.com> | |
Wed, 23 May 2007 20:21:39 +0000 (22:21 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 24 May 2007 05:38:44 +0000 (22:38 -0700) | ||
commit | 3427b375b594b93ed47ae80ca1d6bb361d7d8f5e | |
tree | b64edcb1ed76207acc12ebc534a3cb7102ff6652 | tree | snapshot |
parent | ee4931486b752b0a3ee04be31f25aed13913cb31 | commit | diff |
Allow environment variables to be unset in the processes started by run_command
To unset a variable, just specify its name, without "=". For example:
const char *env[] = {"GIT_DIR=.git", "PWD", NULL};
const char *argv[] = {"git-ls-files", "-s", NULL};
int err = run_command_v_opt_cd_env(argv, RUN_GIT_CMD, ".", env);
The PWD will be unset before executing git-ls-files.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
To unset a variable, just specify its name, without "=". For example:
const char *env[] = {"GIT_DIR=.git", "PWD", NULL};
const char *argv[] = {"git-ls-files", "-s", NULL};
int err = run_command_v_opt_cd_env(argv, RUN_GIT_CMD, ".", env);
The PWD will be unset before executing git-ls-files.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
run-command.c | diff | blob | history | |
run-command.h | diff | blob | history |