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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 19, 2010, 05:15 UTC
Message-ID
<7vbpdgt43w.fsf@alter.siamese.dyndns.org>
In-Reply-To
<201004171957.00944.agruen@suse.de>
Andreas Gruenbacher <agruen@suse.de> writes:
Show 7 quoted lines
> @@ -720,7 +723,8 @@ static enum path_treatment treat_one_path(struct dir_struct *dir,
>  
>  	switch (dtype) {
>  	default:
> -		return path_ignored;
> +		dir_add_ignored(dir, path, *len, DIR_IGNORED_FILETYPE);
> +		break;

Hmm, do we want to break and return path_handled here, to cause the calling read_directory_recursive() to call dir_add_name()?

Also I suspect that (dir->flags & DIR_COLLECT_IGNORED) needs to be checked before making this call.

> +struct dir_vector {
> +	int nr, alloc;
> +	struct dir_entry **entries;
> +};

We would probably call a structure of this shape "dir_array", as I haven't seen us calling anything "vector" for naming consistency.

Instead of introducing two dir-arrays for different kinds of ignoredness, it may be cleaner to add one bit (or more for later expansion) to dir_entry and mark the ones in ignored dir-array with the ignore reason.

Previous: Andreas Gruenbacher
Message 9 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.