Merge branch 'ak/add-i-empty-candidates' into maint
[git/git.git] / git-add--interactive.perl
index f35b3e6..77876d4 100755 (executable)
@@ -1361,6 +1361,7 @@ sub patch_update_file {
                  $patch_mode_flavour{TARGET},
                  " [y,n,q,a,d,/$other,?]? ";
                my $line = prompt_single_character;
+               last unless defined $line;
                if ($line) {
                        if ($line =~ /^y/i) {
                                $hunk[$ix]{USE} = 1;