run-command: trivial style fixes
authorFelipe Contreras <felipe.contreras@gmail.com>
Thu, 31 Oct 2013 09:25:45 +0000 (03:25 -0600)
committerJunio C Hamano <gitster@pobox.com>
Thu, 31 Oct 2013 20:48:26 +0000 (13:48 -0700)
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
run-command.c

index 1b7f88e..3914d9c 100644 (file)
@@ -406,13 +406,12 @@ fail_pipe:
                                        unsetenv(*cmd->env);
                        }
                }
                                        unsetenv(*cmd->env);
                        }
                }
-               if (cmd->git_cmd) {
+               if (cmd->git_cmd)
                        execv_git_cmd(cmd->argv);
                        execv_git_cmd(cmd->argv);
-               } else if (cmd->use_shell) {
+               else if (cmd->use_shell)
                        execv_shell_cmd(cmd->argv);
                        execv_shell_cmd(cmd->argv);
-               } else {
+               else
                        sane_execvp(cmd->argv[0], (char *const*) cmd->argv);
                        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],
                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]);
                cmd->pid = -1;
        }
        close(notify_pipe[0]);
-
 }
 #else
 {
 }
 #else
 {
@@ -480,11 +478,10 @@ fail_pipe:
        if (cmd->env)
                env = make_augmented_environ(cmd->env);
 
        if (cmd->env)
                env = make_augmented_environ(cmd->env);
 
-       if (cmd->git_cmd) {
+       if (cmd->git_cmd)
                cmd->argv = prepare_git_cmd(cmd->argv);
                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->argv = prepare_shell_cmd(cmd->argv);
-       }
 
        cmd->pid = mingw_spawnvpe(cmd->argv[0], cmd->argv, env, cmd->dir,
                                  fhin, fhout, fherr);
 
        cmd->pid = mingw_spawnvpe(cmd->argv[0], cmd->argv, env, cmd->dir,
                                  fhin, fhout, fherr);