Code

difftool: Use eval to expand '--extcmd' expressions
[git.git] / git-add--interactive.perl
index 02e97b90f116d9e3539b0a97c64ecd9064aafe81..cd43c3491260cb2aa51f0d19fd18ab66e4ad8217 100755 (executable)
@@ -259,7 +259,7 @@ sub list_modified {
                @tracked = map {
                        chomp $_;
                        unquote_path($_);
-               } run_cmd_pipe(qw(git ls-files --exclude-standard --), @ARGV);
+               } run_cmd_pipe(qw(git ls-files --), @ARGV);
                return if (!@tracked);
        }
 
@@ -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) {