{"thread":{"id":"10457","subject":"[PATCH 7/7] shell should call setup_path() instead of manually setting up its path","startedAt":"2007-10-25T03:44:51Z","lastAt":"2007-10-25T03:44:51Z","messageCount":1,"participants":["Scott R Parish"],"isPatch":true,"patchVersion":1,"patchTotal":7},"messages":[{"id":"57130","messageId":"1193283892-26167-1-git-send-email-srp@srparish.net","threadId":"10457","inReplyTo":null,"subject":"[PATCH 7/7] shell should call setup_path() instead of manually setting up its path","fromName":"Scott R Parish","fromEmail":"srp@srparish.net","sentAt":"2007-10-25T03:44:51Z","receivedAt":"2007-10-25T03:44:51Z","isPatch":true,"sender":{"key":"srp@srparish.net","avatar":"https://gravatar.com/avatar/870e5b6fc4f710cf4db5684bd9af7f2cee5734b3dab3209b13e00cf64f6c9f0e?d=mp&s=160"},"body":"Signed-off-by: Scott R Parish <srp@srparish.net>\n---\n shell.c |    8 +-------\n 1 files changed, 1 insertions(+), 7 deletions(-)\n\ndiff --git a/shell.c b/shell.c\nindex cfe372b..9826109 100644\n--- a/shell.c\n+++ b/shell.c\n@@ -24,17 +24,11 @@ static int do_cvs_cmd(const char *me, char *arg)\n \tconst char *cvsserver_argv[3] = {\n \t\t\"cvsserver\", \"server\", NULL\n \t};\n-\tconst char *oldpath = getenv(\"PATH\");\n-\tstruct strbuf newpath = STRBUF_INIT;\n \n \tif (!arg || strcmp(arg, \"server\"))\n \t\tdie(\"git-cvsserver only handles server: %s\", arg);\n \n-\tstrbuf_addstr(&newpath, git_exec_path());\n-\tstrbuf_addch(&newpath, ':');\n-\tstrbuf_addstr(&newpath, oldpath);\n-\n-\tsetenv(\"PATH\", strbuf_detach(&newpath, NULL), 1);\n+\tsetup_path(NULL);\n \n \treturn execv_git_cmd(cvsserver_argv);\n }\n-- \ngitgui.0.8.4.11176.gd9205-dirty\n"}]}