git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/5] "status --ignored"

From
Jeff King <peff@peff.net>
Date
Apr 10, 2010, 08:40 UTC
Message-ID
<20100410084007.GA16843@coredump.intra.peff.net>
In-Reply-To
<7vd3y7ycgu.fsf@alter.siamese.dyndns.org>
On Sat, Apr 10, 2010 at 12:48:49AM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > +	dir.flags |= DIR_COLLECT_IGNORED;
> 
> I thought about using collect-ignored so that fill_directory() does not
> have to be run twice, but IIRC it can short-circuit an entire directory
> using the "simplify" logic (as it was designed to be used for "git add"),
> no?

Hmm. I didn't consider that. It may be sufficient to say "foo/ is ignored" and let callers decide for themselves that "foo/bar" is ignored, too (unless, of course, it appears as tracked earlier in the list).

I just worry that your version will perform less well. I'm not that worried about the double traversal (on any reasonable system everything will be cached after the first traversal). But finding every file means we have to traverse areas that git otherwise wouldn't look at, which might mean going to disk to pull in all of the "foo/" directory structure (which is less likely to be cached, since the rest of git isn't touching it), even though it may not even be of interest to us.

-Peff
Previous: Junio C HamanoNext: Eric Raymond
Message 10 of 14 in “"status --ignored"”
  1. 0/5 "status --ignored"Junio C Hamano, Apr 10, 2010
  2. 1/5 wt-status: remove unused workdir_untracked fieldJunio C Hamano, Apr 10, 2010
  3. 2/5 wt-status: plug memory leak while collecting untracked filesJunio C Hamano, Apr 10, 2010
  4. 3/5 wt-status: collect ignored filesJunio C Hamano, Apr 10, 2010
  5. Jeff KingApr 10, 2010
  6. 4/5 wt-status: rename and restructure status-print-untrackedJunio C Hamano, Apr 10, 2010
  7. 5/5 status: --ignored option shows ignored filesJunio C Hamano, Apr 10, 2010
  8. Jeff KingApr 10, 2010
  9. Junio C HamanoApr 10, 2010
  10. Jeff KingApr 10, 2010
  11. Eric RaymondApr 10, 2010
  12. Junio C HamanoApr 10, 2010
  13. Jakub NarebskiApr 10, 2010
  14. Jeff KingApr 11, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.