From 47c8b7003a8ebea5bf6eb49e4f874dc626d6e959 Mon Sep 17 00:00:00 2001 From: David Caldwell Date: Mon, 6 Sep 2021 11:27:09 -0700 Subject: [PATCH] commit-patch: Don't hardcode vi quite as much (helps debian packaging) --- commit-patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commit-patch b/commit-patch index 9b5b2c9..2861a32 100755 --- a/commit-patch +++ b/commit-patch @@ -4,6 +4,7 @@ # This code can be distributed under the terms of the GNU Public License (Version 2 or greater). my $VERSION = '2.6.1'; +my $FALLBACK_EDITOR = 'vi'; use strict; use Cwd qw(abs_path); @@ -180,7 +181,7 @@ if ($commit_partial) { run([split(/ /,$vc{diff}), @ARGV], '>>', $patch); } - system(($ENV{VISUAL} || $ENV{EDITOR} || 'vi')." ".$patch); + system(($ENV{VISUAL} || $ENV{EDITOR} || $FALLBACK_EDITOR)." ".$patch); my $last_patch = "#last-comit-partial.patch"; unlink "$last_patch.3"; rename "$last_patch.2", "$last_patch.3"; -- 2.51.2