summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1eb0569)
raw | patch | inline | side by side (parent: 1eb0569)
author | Scott R Parish <srp@srparish.net> | |
Sat, 27 Oct 2007 08:36:55 +0000 (01:36 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 30 Oct 2007 03:51:37 +0000 (20:51 -0700) |
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>
it can now call setup_path().
Signed-off-by: Scott R Parish <srp@srparish.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
shell.c | patch | blob | history |
index cfe372b21379486ea0c7e4d5686c08064c20c279..9826109d5b1b3746aea33dc6b7ebe7b6da19bd22 100644 (file)
--- a/shell.c
+++ b/shell.c
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);
}