X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;ds=sidebyside;f=git-add--interactive.perl;h=f6e536ece314316ebb281721ed27d7519577202f;hb=8146f19762c8fd67f6df3da4ba87a4e5ea880909;hp=566e3710f5275bb751965744ff1d53ecaa809c97;hpb=a2dc04ba159def766ee17db00c60bdbda477955d;p=git.git diff --git a/git-add--interactive.perl b/git-add--interactive.perl index 566e3710f..f6e536ece 100755 --- a/git-add--interactive.perl +++ b/git-add--interactive.perl @@ -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) {