Skip to content

Commit

Permalink
run-command: trivial style fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Felipe Contreras authored and Junio C Hamano committed Oct 31, 2013
1 parent 4e7e4b6 commit 5a50085
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions run-command.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,13 +406,12 @@ int start_command(struct child_process *cmd)
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],
Expand Down Expand Up @@ -446,7 +445,6 @@ int start_command(struct child_process *cmd)
cmd->pid = -1;
}
close(notify_pipe[0]);

}
#else
{
Expand Down Expand Up @@ -480,11 +478,10 @@ int start_command(struct child_process *cmd)
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);
Expand Down

0 comments on commit 5a50085

Please sign in to comment.