X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-add--interactive.perl;h=cd43c3491260cb2aa51f0d19fd18ab66e4ad8217;hb=748af44c63ea6fec12690f1693f3dddd963e88d5;hp=75b71967a7c2f861c8e75e17c17e5cdce824e2e3;hpb=4b683658be0bd21eac7243bac6fb083e1cc00060;p=git.git diff --git a/git-add--interactive.perl b/git-add--interactive.perl index 75b71967a..cd43c3491 100755 --- a/git-add--interactive.perl +++ b/git-add--interactive.perl @@ -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) {