Re: [PATCH 3/3] match_basename: use strncmp instead of strcmp
- From
Fredrik Gustafsson <iveqy@iveqy.com>
- Date
- Mar 9, 2013, 08:47 UTC
- Message-ID
- <20130309084759.GA8688@paksenarrion.iveqy.com>
- In-Reply-To
- <7v4nglf1w3.fsf@alter.siamese.dyndns.org>
On Fri, Mar 08, 2013 at 11:50:04PM -0800, Junio C Hamano wrote:
> At the same time, I wonder if we can take advantage of the fact that > these call sites only care about equality and not ordering.
I did an RFC-patch for that (that I mistakenly didn't sent as a reply to this e-mail). And I believe that you're correct. My solution is inspired of curl's strequal.
Is the reason for git not to care about lower/upper-case for beeing able to support windows? Or is there any other smart reason?
I was also thinking about discarding files by looking at their modification date. If the modification timestamp is older than/or equal to the latest commit, there's probably no reason for examine that file any further. I'm not sure about the side effects this may imply though. I think they can be quite nasty. Is this something worth digging more in or am I already on the wrong path?
-- Med vänliga hälsningar Fredrik Gustafsson tel: 0733-608274 e-post: iveqy@iveqy.com