X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=wt-status.c;h=fc2438f60b0e0e87772db2a9f3e407f351bb03d0;hb=189645ca844da2fd4f7e3318bbd9f7098e886dc4;hp=54b6b03b9cc4e168e6b6429679b61dc2a1d5197b;hpb=a0b6a9d2b2b0667bc170c864a05b3ec4635a71bb;p=git.git diff --git a/wt-status.c b/wt-status.c index 54b6b03b9..fc2438f60 100644 --- a/wt-status.c +++ b/wt-status.c @@ -390,11 +390,9 @@ static void wt_status_collect_untracked(struct wt_status *s) fill_directory(&dir, s->pathspec); for (i = 0; i < dir.nr; i++) { struct dir_entry *ent = dir.entries[i]; - if (!cache_name_is_other(ent->name, ent->len)) - continue; - if (!match_pathspec(s->pathspec, ent->name, ent->len, 0, NULL)) - continue; - string_list_insert(&s->untracked, ent->name); + if (cache_name_is_other(ent->name, ent->len) && + match_pathspec(s->pathspec, ent->name, ent->len, 0, NULL)) + string_list_insert(&s->untracked, ent->name); free(ent); } @@ -404,11 +402,9 @@ static void wt_status_collect_untracked(struct wt_status *s) fill_directory(&dir, s->pathspec); for (i = 0; i < dir.nr; i++) { struct dir_entry *ent = dir.entries[i]; - if (!cache_name_is_other(ent->name, ent->len)) - continue; - if (!match_pathspec(s->pathspec, ent->name, ent->len, 0, NULL)) - continue; - string_list_insert(&s->ignored, ent->name); + if (cache_name_is_other(ent->name, ent->len) && + match_pathspec(s->pathspec, ent->name, ent->len, 0, NULL)) + string_list_insert(&s->ignored, ent->name); free(ent); } }