Re: [regression?] trailing slash required in .gitattributes
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 24, 2013, 05:25 UTC
- Message-ID
- <7v8v5d4bed.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20130323083927.GA25600@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Yeah, that is a possibility, though it involves casting away some > constness. Patch is below, which seems to work.
Hmm, because this was after I read this part:
> ... match_basename, despite taking the length > of all of the strings we pass it, will happily use NUL-terminated > functions like strcmp or fnmatch.
I actually meant to do that inside match_basename(), not in one particular caller of it. Otherwise, new callers to match_basename() will also suffer from this broken API that pretends as if it takes counted strings but uses strings as NUL terminated, no?
> It still feels really ugly to me, and like match_basename is misdesigned > and should respect the lengths we pass it.
Exactly.