On Thu, Mar 24, 2011 at 5:44 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Wouldn't it be more sensible to add a bit ("is this a glob or are we > expected to match it literally") to each element in the pathspec array, > and pass a pathspec whose elements are all marked as "literal" down from > ls-tree? > > The internal matcher (and traversal optimizer) would need to become aware > of "not a glob" match (and possibly different kinds of matches like "**/" > support) sooner or later, and when that happens you would need something > like the above on the caller side in ls-tree. I think it's possible even now. fnmatch() is only used if pathspec_item.has_wildcard is true. So ls-tree.c only needs to clear this field for all pathspecs and they will be treated literally. Let me try.. -- 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