]> rtime.felk.cvut.cz Git - git.git/blobdiff - git-add--interactive.perl
Merge branch 'ak/add-i-empty-candidates'
[git.git] / git-add--interactive.perl
index c7256741cc2a28f333d6a9be5f12e248df99ed5e..77876d433a1ba2384a690155b51dac8118fa27b4 100755 (executable)
@@ -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";
 }