start_command: do not clobber cmd->env on Windows code path
Previously, it would not be possible to call start_command twice for the same struct child_process that has env set. The fix is achieved by moving the loop that modifies the environment block into a helper function. This also allows us to make two other helper functions static. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
434a6db7dc
commit
2affea4125
@ -222,9 +222,8 @@ void mingw_open_html(const char *path);
|
||||
* helpers
|
||||
*/
|
||||
|
||||
char **copy_environ(void);
|
||||
char **make_augmented_environ(const char *const *vars);
|
||||
void free_environ(char **env);
|
||||
char **env_setenv(char **env, const char *name);
|
||||
|
||||
/*
|
||||
* A replacement of main() that ensures that argv[0] has a path
|
||||
|
Reference in New Issue
Block a user