On Sat, Apr 10, 2010 at 12:40:54AM -0700, Junio C Hamano wrote: > + if (s->show_ignored_files) { > + dir.nr = 0; > + dir.flags = DIR_SHOW_IGNORED | DIR_SHOW_OTHER_DIRECTORIES; > + 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(ent->name, &s->ignored); > + free(ent); > + } > + } > + Why not use DIR_COLLECT_IGNORED, which would mean we only have to traverse the directory tree once? -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html