index 8ce1ec92c2b04e1271b3ee1a41a2ac60d2f8aad4..f813ffdaa1526aa68b4ed8e7d4d04b48e270496a 100755 (executable)
EOF
close $fh;
- my $editor = $ENV{GIT_EDITOR} || $repo->config("core.editor")
- || $ENV{VISUAL} || $ENV{EDITOR} || "vi";
+ chomp(my $editor = run_cmd_pipe(qw(git var GIT_EDITOR)));
system('sh', '-c', $editor.' "$@"', $editor, $hunkfile);
if ($? != 0) {