Browse Source

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:  Gustaf Hendeby <hendeby@isy.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Gustaf Hendeby 17 years ago committed by Junio C Hamano
parent
commit
0e0278baad
  1. 2
      git-send-email.perl

2
git-send-email.perl

@ -400,7 +400,7 @@ EOT @@ -400,7 +400,7 @@ EOT
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 : " . $!;

Loading…
Cancel
Save