On Sun, Mar 10, 2013 at 3:20 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote: >> + else if (*p == '/') >> + dirs--; > > I presume this is to compensate for a pattern like "/pat" whose > leading slash is only to anchor the pattern at the level. Correct? Yes. Also for the record, we could cut down the number of prep_exclude calls significantly by only calling it when we switch directories (i.e. when read_directory_recursive begins or exits), not calling it for all entries of the same directory. For instance, path/, path/a, path/b, path/c/, path/c/d, path/e should only call prep_exclude 3 times when we enter "path", "path/c" and leave "path/c" (rather than 6 times currently). Unfortunately, I see no real time savings by this call reduction. So no patch. Maybe I'll try it again on my slower laptop and see if it makes any difference. -- Duy -- 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