]> rtime.felk.cvut.cz Git - git.git/blobdiff - run-command.c
start_command: do not clobber cmd->env on Windows code path
[git.git] / run-command.c
index f3e7abb7de799a14a8f792195992c4d9d1495c6f..ac314a5a8d96d74a36dd2f274707204142e84b7b 100644 (file)
@@ -173,11 +173,8 @@ fail_pipe:
 
        if (cmd->dir)
                die("chdir in start_command() not implemented");
-       if (cmd->env) {
-               env = copy_environ();
-               for (; *cmd->env; cmd->env++)
-                       env = env_setenv(env, *cmd->env);
-       }
+       if (cmd->env)
+               env = make_augmented_environ(cmd->env);
 
        if (cmd->git_cmd) {
                cmd->argv = prepare_git_cmd(cmd->argv);