On Tue, Mar 26, 2013 at 11:39:27AM -0700, Junio C Hamano wrote:
> So here is an attempt to fix the unintended regression, on top of
> 9db9eecfe5c2 (attr: avoid calling find_basename() twice per path,
> 2013-01-16). It consists of four patches.
Here's my update to the series. I think this should fix all of the
issues. And it should be very easy to drop in Duy's nwildmatch later on;
it can just replace the fnmatch_icase_mem function added in patch 2
The main fix in this iteration is that match_pathname receives the same
treatment as match_basename, which is done in patches 3 and 4 (the
issues were subtly different enough that I didn't want to squash it all
together; plus, gotta keep that commit count up).
[1/6]: attr.c::path_matches(): the basename is part of the pathname
[2/6]: dir.c::match_basename(): pay attention to the length of string
[3/6]: dir.c::match_pathname(): adjust patternlen when shifting pattern
[4/6]: dir.c::match_pathname(): pay attention to the length of string
[5/6]: attr.c::path_matches(): special case paths that end with a slash
[6/6]: t: check that a pattern without trailing slash matches a directory
PS I followed your subject-naming convention since I was adding into
your series, but it seems quite long to me. I would have just said:
"match_basename: pay attention...".
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html