diff options
Diffstat (limited to 'git-add--interactive.perl')
-rwxr-xr-x | git-add--interactive.perl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/git-add--interactive.perl b/git-add--interactive.perl index 1fadd69f88..77876d433a 100755 --- a/git-add--interactive.perl +++ b/git-add--interactive.perl @@ -515,6 +515,9 @@ sub error_msg { sub list_and_choose { my ($opts, @stuff) = @_; my (@chosen, @return); + if (!@stuff) { + return @return; + } my $i; my @prefixes = find_unique_prefixes(@stuff) unless $opts->{LIST_ONLY}; @@ -725,6 +728,8 @@ sub add_untracked_cmd { if (@add) { system(qw(git update-index --add --), @add); say_n_paths('added', @add); + } else { + print "No untracked files.\n"; } print "\n"; } @@ -1356,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; |