Thread (26 messages) flat view 26 messages, 7 authors, 2016-06-15

Re: [PATCH 3/5] wt-status: collect ignored files

From: Jeff King <hidden>
Date: 2016-06-15 22:48:35

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help