Skip to content

Commit 0e0278b

Browse files
hendebygitster
authored andcommitted
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>
1 parent 78d776a commit 0e0278b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-send-email.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ sub expand_aliases {
400400
close(C);
401401

402402
my $editor = $ENV{GIT_EDITOR} || $repo->config("core.editor") || $ENV{VISUAL} || $ENV{EDITOR} || "vi";
403-
system($editor, $compose_filename);
403+
system('sh', '-c', '$0 $@', $editor, $compose_filename);
404404

405405
open(C2,">",$compose_filename . ".final")
406406
or die "Failed to open $compose_filename.final : " . $!;

0 commit comments

Comments
 (0)