Re: [PATCH 2/6] dir.c::match_basename(): pay attention to the length of string parameters
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 28, 2013, 23:10 UTC
- Message-ID
- <7vr4izqfwt.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20130328224928.GA20242@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 26 quoted lines
> On Thu, Mar 28, 2013 at 06:40:27PM -0400, Jeff King wrote: > >> On Thu, Mar 28, 2013 at 05:47:28PM -0400, Jeff King wrote: >> >> > From: Junio C Hamano <gitster@pobox.com> >> > >> > The function takes two counted strings (<basename, basenamelen> and >> > <pattern, patternlen>) as parameters, together with prefix (the >> > length of the prefix in pattern that is to be matched literally >> > without globbing against the basename) and EXC_* flags that tells it >> > how to match the pattern against the basename. >> > >> > However, it did not pay attention to the length of these counted >> > strings. Update them to do the following: >> > >> > * When the entire pattern is to be matched literally, the pattern >> > matches the basename only when the lengths of them are the same, >> > and they match up to that length. >> >> Hrm. Though the tip of this series passes all tests, this one actually >> breaks bisectability. What happens is that the existing code passes: > > Ugh. That is a problem, but this series does _not_ pass all tests. I > think I failed to run the complete test suite on the correct tip. > > My match_pathspec fix breaks at least t1011.
Yeah, the tip of 'jch' (slightly ahead of 'next' that I use myself) has 0003, 1011 and 3001 broken X-<.