From: Junio C Hamano Date: Mon, 20 Apr 2009 10:39:38 +0000 (-0700) Subject: Merge branch 'mm/maint-add-p-quit' X-Git-Tag: v1.6.3-rc2~36 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/21590d5262f71b336926a9d2cec5b04b0aa6c4a0?ds=inline;hp=-c Merge branch 'mm/maint-add-p-quit' * mm/maint-add-p-quit: git add -p: add missing "q" to patch prompt --- 21590d5262f71b336926a9d2cec5b04b0aa6c4a0 diff --combined git-add--interactive.perl index 60dd1b5be2,5407b2e1b8..f6e536ece3 --- a/git-add--interactive.perl +++ b/git-add--interactive.perl @@@ -804,10 -804,6 +804,10 @@@ EO || $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>; @@@ -1049,7 -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) {