Code

match_refs: search ref list tail internally
[git.git] / git-add--interactive.perl
index 566e3710f5275bb751965744ff1d53ecaa809c97..f6e536ece314316ebb281721ed27d7519577202f 100755 (executable)
@@ -804,6 +804,10 @@ EOF
                || $ENV{VISUAL} || $ENV{EDITOR} || "vi";
        system('sh', '-c', $editor.' "$@"', $editor, $hunkfile);
 
+       if ($? != 0) {
+               return undef;
+       }
+
        open $fh, '<', $hunkfile
                or die "failed to open hunk edit file for reading: " . $!;
        my @newtext = grep { !/^#/ } <$fh>;
@@ -1045,7 +1049,7 @@ sub patch_update_file {
                }
                print colored $prompt_color, 'Stage ',
                  ($hunk[$ix]{TYPE} eq 'mode' ? 'mode change' : 'this hunk'),
-                 " [y,n,a,d,/$other,?]? ";
+                 " [y,n,q,a,d,/$other,?]? ";
                my $line = prompt_single_character;
                if ($line) {
                        if ($line =~ /^y/i) {