git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Andreas Gruenbacher <agruen@suse.de>
Cc: Alex Riesen <raa.lkml@gmail.com>, git@vger.kernel.org
Subject: Re: [BUG] Git add <device file> silently fails
Date: Sun, 18 Apr 2010 22:15:31 -0700	[thread overview]
Message-ID: <7vbpdgt43w.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <201004171957.00944.agruen@suse.de> (Andreas Gruenbacher's message of "Sat\, 17 Apr 2010 19\:57\:00 +0200")

Andreas Gruenbacher <agruen@suse.de> writes:

> @@ -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.

      reply	other threads:[~2010-04-19  5:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-17 14:24 [BUG] Git add <device file> silently fails Andreas Gruenbacher
2010-04-17 14:44 ` Alex Riesen
2010-04-17 15:00   ` Andreas Gruenbacher
2010-04-17 15:27     ` Alex Riesen
2010-04-17 16:38   ` Junio C Hamano
2010-04-17 17:32     ` Alex Riesen
2010-04-17 18:23       ` Alex Riesen
2010-04-17 17:57     ` Andreas Gruenbacher
2010-04-19  5:15       ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vbpdgt43w.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=agruen@suse.de \
    --cc=git@vger.kernel.org \
    --cc=raa.lkml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).