git: Remove handling for GIT_PREFIX

handle_alias() no longer needs to set GIT_PREFIX since it is defined in setup_git_directory_gently(). Remove the duplicated effort and use run_command_v_opt() since there is no need to setup the environment. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

David Aguilar committed May 25, 2011 at 20:37 UTC 26b052515d1714918a7da4bfcdaaca37dc4db2e0
1 file changed +1 -9
git.c
+1 -9
@@ -179,8 +179,6 @@ static int handle_alias(int *argcp, const char ***argv)
179 if (alias_string[0] == '!') {
180 const char **alias_argv;
181 int argc = *argcp, i;
182 - struct strbuf sb = STRBUF_INIT;
183 - const char *env[2];
182
183 commit_pager_choice();
184
@@ -191,13 +189,7 @@ static int handle_alias(int *argcp, const char ***argv)
189 alias_argv[i] = (*argv)[i];
190 alias_argv[argc] = NULL;
191
194 - strbuf_addstr(&sb, "GIT_PREFIX=");
195 - if (subdir)
196 - strbuf_addstr(&sb, subdir);
197 - env[0] = sb.buf;
198 - env[1] = NULL;
199 - ret = run_command_v_opt_cd_env(alias_argv, RUN_USING_SHELL, NULL, env);
200 - strbuf_release(&sb);
192 + ret = run_command_v_opt(alias_argv, RUN_USING_SHELL);
193 if (ret >= 0) /* normal exit */
194 exit(ret);
195