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

Re: [BUG] Git add <device file> silently fails

From
Alex Riesen <raa.lkml@gmail.com>
Date
Apr 17, 2010, 18:23 UTC
Message-ID
<v2o81b0412b1004171123z20c2c042qabb2b76143390a36@mail.gmail.com>
In-Reply-To
<n2i81b0412b1004171032v713f156ase295cbe7bbedf1f6@mail.gmail.com>
On Sat, Apr 17, 2010 at 19:32, Alex Riesen <raa.lkml@gmail.com> wrote:
Show 17 quoted lines
> On Sat, Apr 17, 2010 at 18:38, Junio C Hamano <gitster@pobox.com> wrote:
>> Alex Riesen <raa.lkml@gmail.com> 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...

Previous: Alex RiesenNext: Andreas Gruenbacher
Message 7 of 9 in “[BUG] Git add <device file> silently fails”
  1. Andreas GruenbacherApr 17, 2010
  2. Alex RiesenApr 17, 2010
  3. Andreas GruenbacherApr 17, 2010
  4. Alex RiesenApr 17, 2010
  5. Junio C HamanoApr 17, 2010
  6. Alex RiesenApr 17, 2010
  7. Alex RiesenApr 17, 2010
  8. Andreas GruenbacherApr 17, 2010
  9. Junio C HamanoApr 19, 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.