Re: [regression?] trailing slash required in .gitattributes
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 22, 2013, 23:08 UTC
- Message-ID
- <7vzjxv3uef.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20130322222438.GA13207@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> if (pathlen && pathname[pathlen-1] == '/') > pathlen--; > > would work. But it seems that match_basename, despite taking the length > of all of the strings we pass it, will happily use NUL-terminated > functions like strcmp or fnmatch. Converting the former to check lengths > should be pretty straightforward. But there is no version of fnmatch > that does what we want. I wonder if we using wildmatch can get around > this limitation.
Or save away pathname[pathlen], temporarily NUL terminate and call these functions?