Skip to content

Commit 5a50085

Browse files
felipecgitster
authored andcommitted
run-command: trivial style fixes
Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4e7e4b6 commit 5a50085

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

run-command.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -406,13 +406,12 @@ int start_command(struct child_process *cmd)
406406
unsetenv(*cmd->env);
407407
}
408408
}
409-
if (cmd->git_cmd) {
409+
if (cmd->git_cmd)
410410
execv_git_cmd(cmd->argv);
411-
} else if (cmd->use_shell) {
411+
else if (cmd->use_shell)
412412
execv_shell_cmd(cmd->argv);
413-
} else {
413+
else
414414
sane_execvp(cmd->argv[0], (char *const*) cmd->argv);
415-
}
416415
if (errno == ENOENT) {
417416
if (!cmd->silent_exec_failure)
418417
error("cannot run %s: %s", cmd->argv[0],
@@ -446,7 +445,6 @@ int start_command(struct child_process *cmd)
446445
cmd->pid = -1;
447446
}
448447
close(notify_pipe[0]);
449-
450448
}
451449
#else
452450
{
@@ -480,11 +478,10 @@ int start_command(struct child_process *cmd)
480478
if (cmd->env)
481479
env = make_augmented_environ(cmd->env);
482480

483-
if (cmd->git_cmd) {
481+
if (cmd->git_cmd)
484482
cmd->argv = prepare_git_cmd(cmd->argv);
485-
} else if (cmd->use_shell) {
483+
else if (cmd->use_shell)
486484
cmd->argv = prepare_shell_cmd(cmd->argv);
487-
}
488485

489486
cmd->pid = mingw_spawnvpe(cmd->argv[0], cmd->argv, env, cmd->dir,
490487
fhin, fhout, fherr);

0 commit comments

Comments
 (0)