summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Felipe Contreras <felipe.contreras@gmail.com>2013-10-31 03:25:45 -0600
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-10-31 13:48:26 -0700
commit5a50085c6b4dd7838167c6ce04042b4b563d8916 (patch)
tree4a01002371d16997991d0317a2abc71ec8cfe393
parentdiff: trivial style fix (diff)
downloadtgif-5a50085c6b4dd7838167c6ce04042b4b563d8916.tar.xz
run-command: trivial style fixes
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--run-command.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/run-command.c b/run-command.c
index 1b7f88eeb1..3914d9c511 100644
--- a/run-command.c
+++ b/run-command.c
@@ -406,13 +406,12 @@ fail_pipe:
unsetenv(*cmd->env);
}
}
- if (cmd->git_cmd) {
+ if (cmd->git_cmd)
execv_git_cmd(cmd->argv);
- } else if (cmd->use_shell) {
+ else if (cmd->use_shell)
execv_shell_cmd(cmd->argv);
- } else {
+ else
sane_execvp(cmd->argv[0], (char *const*) cmd->argv);
- }
if (errno == ENOENT) {
if (!cmd->silent_exec_failure)
error("cannot run %s: %s", cmd->argv[0],
@@ -446,7 +445,6 @@ fail_pipe:
cmd->pid = -1;
}
close(notify_pipe[0]);
-
}
#else
{
@@ -480,11 +478,10 @@ fail_pipe:
if (cmd->env)
env = make_augmented_environ(cmd->env);
- if (cmd->git_cmd) {
+ if (cmd->git_cmd)
cmd->argv = prepare_git_cmd(cmd->argv);
- } else if (cmd->use_shell) {
+ else if (cmd->use_shell)
cmd->argv = prepare_shell_cmd(cmd->argv);
- }
cmd->pid = mingw_spawnvpe(cmd->argv[0], cmd->argv, env, cmd->dir,
fhin, fhout, fherr);