git_config_maybe_bool()
[gitweb.git] / git-add--interactive.perl
index 75b71967a7c2f861c8e75e17c17e5cdce824e2e3..cd43c3491260cb2aa51f0d19fd18ab66e4ad8217 100755 (executable)
@@ -990,8 +990,7 @@ sub edit_hunk_manually {
 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) {