Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> writes: > Here's a patch. It passes all tests. It's not that complex. But people > should double-check. ESPECIALLY the list of special characters (currently > '?' '*' '\\' and '['). I think the above is a good set. This is an optimization different from what I was thinking about. I was hoping that we do not even need to call into read_directory() if all the pathspec[] elements succeeds to lstat() and they are not directories; in such a case we can just stuff them to dir structure by hand, and use the remainder for directory walk. But I like this patch better. We need to look at .gitignore to warn about adding ignored files, so we cannot just stuff what are found to dir without checking if they are ignored. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html