[PATCH] git-svn: Allow using arguments to the editor.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When setting the EDITOR or VISUAL environment variable, one might want
to hand over arguments (like e.g. for not backgrounding a GUI editor but
waiting for it to finish. This patch enables that posibility, before it
did look for a program with the content of the variable, including the
space as filename part. The change is in sync with regular behavior with
various other tools, git itself included.

Signed-off-by: Gerfried Fuchs <rhonda@xxxxxx>
---
 git-svn.perl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 83cb36f..d29664c 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1137,8 +1137,9 @@ sub get_commit_entry {
 
 	if ($_edit || ($type eq 'tree')) {
 		my $editor = $ENV{VISUAL} || $ENV{EDITOR} || 'vi';
+		my (@editor) = split /\s+/, $editor;
 		# TODO: strip out spaces, comments, like git-commit.sh
-		system($editor, $commit_editmsg);
+		system(@editor, $commit_editmsg);
 	}
 	rename $commit_editmsg, $commit_msg or croak $!;
 	{
-- 
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux