X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-add--interactive.perl;h=21f1330a5bf26c955051ce9cf263289d90c7667b;hb=ed40a0951cedb70777669144478166aa5bb2cf9c;hp=7493e68b8430c2dc3e3c707a5db59179e69a11d8;hpb=e1327ed5fbaca0af44db89d60c33b641e2f21ee1;p=git.git diff --git a/git-add--interactive.perl b/git-add--interactive.perl index 7493e68b8..21f1330a5 100755 --- a/git-add--interactive.perl +++ b/git-add--interactive.perl @@ -1012,8 +1012,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) {