status: fix bug with missing --ignore files
authorJeff King <peff@peff.net>
Thu, 2 Jun 2011 05:54:49 +0000 (01:54 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 2 Jun 2011 15:48:41 +0000 (08:48 -0700)
Commit 1b908b6 (wt-status: rename and restructure
status-print-untracked, 2010-04-10) converted the
wt_status_print_untracked function into
wt_status_print_other, taking a string_list of either
untracked or ignored items to print. However, the "nothing
to show" early return still checked the wt_status->untracked
list instead of the passed-in list.

That meant that if we had ignored items to show, but no
untracked items, we would erroneously exit early and fail to
show the ignored items.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
wt-status.c

index 7bda9953e0bd2a9a7b803e6e341d8833aaf9dd89..160e841261fffdaa2160d8ab3767fd68c9f0da82 100644 (file)
@@ -551,7 +551,7 @@ static void wt_status_print_other(struct wt_status *s,
        int i;
        struct strbuf buf = STRBUF_INIT;
 
-       if (!s->untracked.nr)
+       if (!l->nr)
                return;
 
        wt_status_print_other_header(s, what, how);