From: Junio C Hamano Date: Mon, 19 Apr 2010 05:15:31 GMT Subject: Re: [BUG] Git add silently fails Message-ID: <7vbpdgt43w.fsf@alter.siamese.dyndns.org> In-Reply-To: <201004171957.00944.agruen@suse.de> Andreas Gruenbacher 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.