提交 0e0278ba 编写于 作者: G Gustaf Hendeby 提交者: Junio C Hamano

Make git send-email accept $EDITOR with arguments

Currently git send-email does not accept $EDITOR with arguments, eg,
emacs -nw, when starting an editor to produce a cover letter.  This
patch changes this by letting the shell handle the option parsing.
Signed-off-by: NGustaf Hendeby <hendeby@isy.liu.se>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 78d776a9
......@@ -400,7 +400,7 @@ sub expand_aliases {
close(C);
my $editor = $ENV{GIT_EDITOR} || $repo->config("core.editor") || $ENV{VISUAL} || $ENV{EDITOR} || "vi";
system($editor, $compose_filename);
system('sh', '-c', '$0 $@', $editor, $compose_filename);
open(C2,">",$compose_filename . ".final")
or die "Failed to open $compose_filename.final : " . $!;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册