diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-10-31 23:53:51 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-10-31 23:53:51 -0700 |
commit | 452b80058235040461dae01933270c6668741b64 (patch) | |
tree | d9915c8215d2840504bf34bcb0cac91122fc334b /shell.c | |
parent | 37701381b66ab66234a0a5992f2b107a6507a2fb (diff) | |
parent | e8f5d87056093f40a271f89c2c91d1a7025e2440 (diff) | |
download | git-452b80058235040461dae01933270c6668741b64.tar.gz git-452b80058235040461dae01933270c6668741b64.tar.xz |
Merge branch 'sp/help'
* sp/help:
shell should call the new setup_path() to setup $PATH
include $PATH in generating list of commands for "help -a"
use only the $PATH for exec'ing git commands
list_commands(): simplify code by using chdir()
"current_exec_path" is a misleading name, use "argv_exec_path"
remove unused/unneeded "pattern" argument of list_commands
"git" returns 1; "git help" and "git help -a" return 0
Diffstat (limited to 'shell.c')
-rw-r--r-- | shell.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -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); } |