Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> writes: > 2011/2/12 Junio C Hamano <gitster@xxxxxxxxx>: >> >> The function fill_directory() already takes a pathspec, albeit in the >> degenerate "const char **" form. Why does its output need further >> filtering? > > Because it was designed so? Quotes from 9fc42d6 (Optimize directory > listing with pathspec limiter. - 2007-03-30), which added > simplify_away(), the function that does pathspec filtering for > fill_directory(): > > NOTE! This does *not* obviate the need for the caller to do the *exact* > pathspec match later. It's a first-level filter on "read_directory()", but > it does not do the full pathspec thing. Maybe it should. But in the > meantime,... I was around back then, so I know how the code came about ;-) The pieces used in the pathspec limiting logic have been restructured well enough that I suspect it may now be feasible for us to revisit the "Maybe it should" part in the above quote. Thanks to nd/struct-pathspec topic, I think we are already half-way there. -- 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