@matheusbsbs / matheus-bagliano / commits / 0e0278baad
Fork 0

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>

Gustaf Hendeby committed Dec 22, 2007 at 01:40 UTC 0e0278baad8752da6c3b37495f005dc1dd6f799a
1 file changed +1 -1
git-send-email.perl
+1 -1
@@ -400,7 +400,7 @@ EOT
400 close(C);
401
402 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);
404
405 open(C2,">",$compose_filename . ".final")
406 or die "Failed to open $compose_filename.final : " . $!;