From: Alex Riesen Date: Sat, 17 Apr 2010 18:23:26 GMT Subject: Re: [BUG] Git add silently fails Message-ID: In-Reply-To: On Sat, Apr 17, 2010 at 19:32, Alex Riesen wrote: > On Sat, Apr 17, 2010 at 18:38, Junio C Hamano wrote: >> Alex Riesen writes: >> >>> I think something like this should make the accident more >>> noticable: >> >> The early skippage done in dir.c (read-directory-recursive) should treat >> these as ignored just like paths that are ignored with .gitignore >> mechanism, and if we do so, we shouldn't need this patch to add another >> codepath to give notification to the user (we would however still need >> to reword "'add -f' if you really want to add it", though). >> > > I see. Special files are not treated as ignored yet (and there will be > no way to un-ignore them). I have to read the code for a while, > ignored pathnames are sometimes stored for later use too. > I am tempted to add a mode_t or DT_something to struct dir_entry. Users of read_directory are likely to do an lstat anyway (well, builtin/add.c does), and sometimes there is something to fill it with (get_dtype for DT_UNKNOWN). The only problem is that the structure is allocated a lot...