Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'editor.c')
-rw-r--r--editor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/editor.c b/editor.c
index d92a8d9ab5..8b9648281d 100644
--- a/editor.c
+++ b/editor.c
@@ -1,6 +1,7 @@
#include "cache.h"
#include "config.h"
#include "strbuf.h"
+#include "strvec.h"
#include "run-command.h"
#include "sigchain.h"
@@ -78,7 +79,8 @@ static int launch_specified_editor(const char *editor, const char *path,
strbuf_realpath(&realpath, path, 1);
strvec_pushl(&p.args, editor, realpath.buf, NULL);
- p.env = env;
+ if (env)
+ strvec_pushv(&p.env_array, (const char **)env);
p.use_shell = 1;
p.trace2_child_class = "editor";
if (start_command(&p) < 0) {