[RFC/PATCH] consistently try VISUAL, EDITOR and vi in this order.

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

 



git grep -e VISUAL -e EDITOR revealed this inconsistency.  All
other commands seem to check VISUAL and then EDITOR as they should.

---
diff --git a/git-send-email.perl b/git-send-email.perl
index c5d9e73..7b81962 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -222,8 +256,7 @@ GIT: for the patch you are writing.
 EOT
 	close(C);
 
-	my $editor = $ENV{EDITOR};
-	$editor = 'vi' unless defined $editor;
+	my $editor = $ENV{VISUAL} || $ENV{EDITOR} || 'vi';
 	system($editor, $compose_filename);
 
 	open(C2,">",$compose_filename . ".final")

-
: 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]