Skip to content

Commit 47c8b70

Browse files
committed
commit-patch: Don't hardcode vi quite as much (helps debian packaging)
1 parent da879f2 commit 47c8b70

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

commit-patch

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# This code can be distributed under the terms of the GNU Public License (Version 2 or greater).
55

66
my $VERSION = '2.6.1';
7+
my $FALLBACK_EDITOR = 'vi';
78

89
use strict;
910
use Cwd qw(abs_path);
@@ -180,7 +181,7 @@ if ($commit_partial) {
180181

181182
run([split(/ /,$vc{diff}), @ARGV], '>>', $patch);
182183
}
183-
system(($ENV{VISUAL} || $ENV{EDITOR} || 'vi')." ".$patch);
184+
system(($ENV{VISUAL} || $ENV{EDITOR} || $FALLBACK_EDITOR)." ".$patch);
184185
my $last_patch = "#last-comit-partial.patch";
185186
unlink "$last_patch.3";
186187
rename "$last_patch.2", "$last_patch.3";

0 commit comments

Comments
 (0)