Skip to content

Commit

Permalink
status: fix bug with missing --ignore files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Jun 2, 2011
1 parent 2381e39 commit 1282988
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wt-status.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1282988

Please sign in to comment.