Skip to content

Commit

Permalink
shell should call the new setup_path() to setup $PATH
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Scott R Parish authored and Junio C Hamano committed Oct 30, 2007
1 parent 1eb0569 commit e8f5d87
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit e8f5d87

Please sign in to comment.