Skip to content

Commit

Permalink
Make git send-email accept $EDITOR with arguments
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gustaf Hendeby authored and Junio C Hamano committed Dec 22, 2007
1 parent 78d776a commit 0e0278b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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 : " . $!;
Expand Down

0 comments on commit 0e0278b

Please sign in to comment.