]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-add--interactive.perl
l10n: correct indentation of show-branch usage
[thirdparty/git.git] / git-add--interactive.perl
index 32c2f9cf88201b2dc2b94b9c97633c8c67d8c6c5..c7256741cc2a28f333d6a9be5f12e248df99ed5e 100755 (executable)
@@ -58,6 +58,9 @@ if ($repo->config_bool("interactive.singlekey")) {
                Term::ReadKey->import;
                $use_readkey = 1;
        };
+       if (!$use_readkey) {
+               print STDERR "missing Term::ReadKey, disabling interactive.singlekey\n";
+       }
        eval {
                require Term::Cap;
                my $termcap = Term::Cap->Tgetent;
@@ -1353,6 +1356,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;