summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-add--interactive.perl5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 1fadd69f88..f35b3e6152 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";
}