summaryrefslogtreecommitdiff
path: root/shell.c
diff options
context:
space:
mode:
authorScott R Parish <srp@srparish.net>2007-10-27 08:36:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-10-30 03:51:37 (GMT)
commite8f5d87056093f40a271f89c2c91d1a7025e2440 (patch)
tree68de0fb7585af8fc591f36204b6301c31bf5c511 /shell.c
parent1eb056905a2956ca9fabd2edcce05c0a29ce64b1 (diff)
downloadgit-e8f5d87056093f40a271f89c2c91d1a7025e2440.zip
git-e8f5d87056093f40a271f89c2c91d1a7025e2440.tar.gz
git-e8f5d87056093f40a271f89c2c91d1a7025e2440.tar.bz2
shell should call the new setup_path() to setup $PATH
Shell currently does its own manual thing for setting up the $PATH; it can now call setup_path(). Signed-off-by: Scott R Parish <srp@srparish.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'shell.c')
-rw-r--r--shell.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/shell.c b/shell.c
index cfe372b..9826109 100644
--- a/shell.c
+++ b/shell.c
@@ -24,17 +24,11 @@ static int do_cvs_cmd(const char *me, char *arg)
const char *cvsserver_argv[3] = {
"cvsserver", "server", NULL
};
- const char *oldpath = getenv("PATH");
- struct strbuf newpath = STRBUF_INIT;
if (!arg || strcmp(arg, "server"))
die("git-cvsserver only handles server: %s", arg);
- strbuf_addstr(&newpath, git_exec_path());
- strbuf_addch(&newpath, ':');
- strbuf_addstr(&newpath, oldpath);
-
- setenv("PATH", strbuf_detach(&newpath, NULL), 1);
+ setup_path(NULL);
return execv_git_cmd(cvsserver_argv);
}