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, 1 insertions, 3 deletions
diff --git a/editor.c b/editor.c
index fdd3eeafa9..d92a8d9ab5 100644
--- a/editor.c
+++ b/editor.c
@@ -55,7 +55,6 @@ static int launch_specified_editor(const char *editor, const char *path,
if (strcmp(editor, ":")) {
struct strbuf realpath = STRBUF_INIT;
- const char *args[] = { editor, NULL, NULL };
struct child_process p = CHILD_PROCESS_INIT;
int ret, sig;
int print_waiting_for_editor = advice_enabled(ADVICE_WAITING_FOR_EDITOR) && isatty(2);
@@ -77,9 +76,8 @@ static int launch_specified_editor(const char *editor, const char *path,
}
strbuf_realpath(&realpath, path, 1);
- args[1] = realpath.buf;
- p.argv = args;
+ strvec_pushl(&p.args, editor, realpath.buf, NULL);
p.env = env;
p.use_shell = 1;
p.trace2_child_class = "editor";