From 0e0278baad8752da6c3b37495f005dc1dd6f799a Mon Sep 17 00:00:00 2001 From: Gustaf Hendeby Date: Sat, 22 Dec 2007 01:40:52 +0100 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- git-send-email.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-send-email.perl b/git-send-email.perl index 248d03508..e47994afc 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -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 : " . $!; -- 2.30.2