git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-svn: Allow using arguments to the editor.
@ 2009-02-18 13:47 Gerfried Fuchs
  2009-02-18 14:15 ` Thomas Rast
  2009-02-19  8:10 ` Eric Wong
  0 siblings, 2 replies; 5+ messages in thread
From: Gerfried Fuchs @ 2009-02-18 13:47 UTC (permalink / raw)
  To: git; +Cc: Gerfried Fuchs

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@deb.at>
---
 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-02-19  8:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-18 13:47 [PATCH] git-svn: Allow using arguments to the editor Gerfried Fuchs
2009-02-18 14:15 ` Thomas Rast
2009-02-18 14:48   ` Gerfried Fuchs
2009-02-18 15:43     ` Thomas Rast
2009-02-19  8:10 ` Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).