X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=shell.c;h=9826109d5b1b3746aea33dc6b7ebe7b6da19bd22;hb=6959893b0b65ebc68ce2fb524a8ec15a26ca4972;hp=cfe372b21379486ea0c7e4d5686c08064c20c279;hpb=9c51414f8efb73525a6c69917f1499dab081679d;p=git.git diff --git a/shell.c b/shell.c index cfe372b21..9826109d5 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); }