summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1f5d271)
raw | patch | inline | side by side (parent: 1f5d271)
author | David Aguilar <davvid@gmail.com> | |
Thu, 26 May 2011 03:37:13 +0000 (20:37 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 26 May 2011 22:05:52 +0000 (15:05 -0700) |
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>
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>
git.c | patch | blob | history |
index ed899512f9c4220f7d7a2b9e28e1a0eb23c06b8c..ef598c3e7053b8dd2859f4d582ce2917a804fe42 100644 (file)
--- a/git.c
+++ b/git.c
if (alias_string[0] == '!') {
const char **alias_argv;
int argc = *argcp, i;
- struct strbuf sb = STRBUF_INIT;
- const char *env[2];
commit_pager_choice();
alias_argv[i] = (*argv)[i];
alias_argv[argc] = NULL;
- strbuf_addstr(&sb, "GIT_PREFIX=");
- if (subdir)
- strbuf_addstr(&sb, subdir);
- env[0] = sb.buf;
- env[1] = NULL;
- ret = run_command_v_opt_cd_env(alias_argv, RUN_USING_SHELL, NULL, env);
- strbuf_release(&sb);
+ ret = run_command_v_opt(alias_argv, RUN_USING_SHELL);
if (ret >= 0) /* normal exit */
exit(ret);